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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting Date Field to Day of the Week

Status
Not open for further replies.
Sep 10, 2009
37
US
I have the below field:

command.date, this is how it shows on the report now:

2009-7-22, how can I get it to show 'Monday' as opposed to the date itself?

Thanks!
 
//dayofweekname
select dayofweek({@date})
case 1:"Sunday"
case 2:"Monday"
case 3:"Tuesday"
Case 4:"Wednesday"
case 5:"Thursday"
Case 6:"Friday"
Case 7:"Saturday"

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
You could just use:

weekdayname(dayofweek({command.date}))

-LB
 
OK I spose that one is a little better ;)





_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top