Reputation: 1
I would like to include the name of the day in my query in ms access? I know how to do it from the query designer in the format field as 'dddd', but want to rather add it in the sql editor as part of my statement.
Its part of a select, from, where, group by, order by statement where the date is specified in the where clause but i want it to display as the name of the day ie Tuesday in another column.
Thanks
Upvotes: 0
Views: 11298
Reputation: 6999
Here is a select statement that returns you the day name from the date time
SELECT datename(dw,GETDATE()) AS 'Day Name'
This gives me the current day name.
Upvotes: 0
Reputation: 91326
Format works for queries, too:
SELECT ADate, Format([ADate],"dddd") AS ADay
FROM Table1;
Upvotes: 2