day of the week

  • Thread starter Thread starter ian
  • Start date Start date
I

ian

can somebody tell me the expressin to put into a query so
I get the day of the week (mon, tues, etc..) from a date
field.

the date field is called [createdate]
 
Format([CreateDate],"ddd") will return Mon, Tues, etc.

Format([CreateDate],"dddd") will return Monday, Tuesday, etc.
 
Check Access VB Help on the WeekDay() and WeekDayName() functions.
 
There are a couple of ways. You will need to make a calculated field in the
query.

Example
NameOfDay:Format([CreateDate], "ddd")
or
NameOfDay:WeekdayName(WeekDay([CreateDate], True)

The True in the second statement means to use the abbreviation (i.e. Wed),
if you use False you'll get the full name (i.e. Wednesday). To get the full
name in the first example change "ddd" to "dddd".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top