Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Date to Day Post Reply Post New Topic
Author Message
lyka90
Newbie
Newbie
Avatar

Joined: 07 Feb 2008
Location: Philippines
Online Status: Offline
Posts: 1
Quote lyka90 Replybullet Topic: Date to Day
     Posted: 08 Feb 2008 at 12:35am

Appreciate if anyone can advise how to convert a date or datetime to day. Example: 2/8/2008 convert to "Friday". Thank you.

Lyka
IP IP Logged
Lugh
Senior Member
Senior Member
Avatar

Joined: 14 Nov 2007
Online Status: Offline
Posts: 377
Quote Lugh Replybullet Posted: 08 Feb 2008 at 5:24am
You need to use a combination of two functions.

DayOfWeek gives the numerical day of the week.  WeekdayName gives the name of the day for a given numerical value.  So, you combine that like so:

WeekdayName( DayOfWeek( {MyReport.MyDate} ) )

You can add in some other options, based on first day of the week and whether you want it abbreviated.  But, this is the basic syntax.


IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum