Morning all
My database records shifts worked. A query includes the following calculated field:
Weekday: Weekday([ShiftDate])
This returns a number representing the day of the week as a function of the shift date.
Could someone point me in the right direction to convert the integer into a day of the week text please?
Thanks
Regards
Graeme
Weekdays
-
- Cosmic Lounger
- Posts: 1230
- Joined: 11 Feb 2010, 12:23
- Location: Medway, Kent, UK
-
- Administrator
- Posts: 78493
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Weekdays
You could use
DOW: Format([ShiftDate],"ddd")
if you want to return Mon, Tue, Wed etc., or
DOW: Format([ShiftDate],"dddd")
if you want to return Monday, Tuesday, Wednesday etc.
Alternatively, you can use
DOW: WeekdayName([Weekday],True)
for Mon, Tue, Wed etc., or
DOW: WeekdayName([Weekday],False)
for Monday, Tuesday, Wednesday etc.
DOW: Format([ShiftDate],"ddd")
if you want to return Mon, Tue, Wed etc., or
DOW: Format([ShiftDate],"dddd")
if you want to return Monday, Tuesday, Wednesday etc.
Alternatively, you can use
DOW: WeekdayName([Weekday],True)
for Mon, Tue, Wed etc., or
DOW: WeekdayName([Weekday],False)
for Monday, Tuesday, Wednesday etc.
Best wishes,
Hans
Hans
-
- Cosmic Lounger
- Posts: 1230
- Joined: 11 Feb 2010, 12:23
- Location: Medway, Kent, UK
Re: Weekdays
Thanks Hans, that's perfect.
I'll go and knock out my report now.
Regards
Graeme
I'll go and knock out my report now.
Regards
Graeme