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!

Get the Day Name from a Date.

Status
Not open for further replies.

paullem

Programmer
Jan 21, 2005
80
GB
Hi,

I need to obtain a day name from a date so as to determine if the date is a weekday or weekend. Is there a function within Access to achieve this? I've had a look through the FAq's but couldn't see anything that may be relevant (unless I missed it).

Thanks,

paullem

 
To get the name of the day, you can try the format function

? format(date, "dddd")

But there are other ways to work with this, too, for instance the weekday function

? weekday(date)

- note that default is that sunday is first day, for other, use

? weekday(date, vbMonday)

Roy-Vidar
 
Many thanks for that - the format function does exactly what I need.

paullem

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top