Crystal Reports – How to convert a date to day

The following formula shows how to convert a date value to the day of the week.

To do this we need to use:

  • DayOfWeek – this takes a date and converts it to a number, representing the day of the week (e.g. 3)
  • WeekdayName – this converts a given number to the weekday name (e.g. Tuesday)

Note: both these functions use Sunday as the first day of the week – however, as we’re using them together this is of no significance.

To use, create a formula field in your Crystal Report – recreate the formula using the code below as an example and add to your report.

WeekdayName( DayOfWeek ( {Table.Date} ) ) 

 

Reference: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=2837