| | |
|
|
|
day of the week |
| message from ian on 5 May 2004 |
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]
|
| Cheryl Fischer replied to ian on 5 May 2004 |
Format([CreateDate],"ddd") will return Mon, Tues, etc.
Format([CreateDate],"dddd") will return Monday, Tuesday, etc.
|
| Van T. Dinh replied to ian on 6 May 2004 |
Check Access VB Help on the WeekDay() and WeekDayName() functions.
|
| Wayne Morgan replied to ian on 5 May 2004 |
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".
|
|
Archived message: day of the week (Microsoft Access Error Message)