Sometimes you need the actual day name of the date and not the numeric equivalent, the following function will do that for you:
Public Function MyWeekDayName(dteDate As Date) As String
'Will return "Monday", "Tuesday", etc. based on the date supplied
MyWeekDayName = WeekdayName(WeekDay(dteDate), False)
End Function
Example use in debugger window:
?MyWeekDayName(#10/19/2009#)
Monday
Almost, actually what comes back is a day out, when fed a date that should be a Monday, “Tuesday” is returned, a date occurring on a Thursday returns “Friday”, etc.
Hi Simon,
The function works for me as advertised, could it be in your country the month and date is switched to dd/mm/yy? Here in the US it’s mm/dd/yy.
Let me know
Juan