microsoft access help database programing developer
Back to Access Experts About Access Experts Access Experts Websites Access Experts Team Access Experts Services Access Experts Case Studies Access Expert Tips Contact Access Experts OUR BLOG
 
 
Access function to return day of the week
by Juan Soto
10/19/2009

If you need "Monday" instead of 2, then this function is for you.

Sometimes you need the actual day name of the date and not the numeric equivalent, the following function will do that for you:

Private 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


If you like this tip you will be delighted with our service! Call or write us today for a free quote regarding your computer needs.

Publish this article in your own corporate newsletter or publication! Contact us to obtain a free license.


Home | About Us Why PCExperts | Team | Services | Newsletter | Contact Us
Copyright © 2004