Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Date with Day"- Format in Crystal Reports 9

Status
Not open for further replies.

svetlana1

Technical User
Feb 5, 2004
1
DE
Hallo!
Would anybody help me please to present a date in this form: CStr(Datefield, "dd.MM ddd") (for example "04.02 Thu") in order to sort(!) it then ascending by date, not by string? Thank You very much!
svetlana
 
Svetlana

I can only suggest that you sort or group your report on date field you want and then create a formula which breaks down date into elements you require, and then reassemble as a string.

eg
weekdayname(weekday({DATE}), true)

This brings back abbreviated day name

Totext(day({DATE}),0,"")
This brings back Day number in month, the extra arguments remove decimal places and Thousand separators)

Hope this helps

Ian Waterman
UK Crystal Reports Consultant

 
I don't know about 9.0, but in 8.5, you can get that format by customizing the way your date field displays...

Right click on the date field > Format Field > on the Date/Time tab, click the Customize button and format the date as you described by using the available options.

-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top