Show day of the week

dwilliams

Registered User.
Local time
Today, 10:12
Joined
Jul 29, 2006
Messages
22
Hi,
I have a straight forward table with a field called DATE. I run a query on that table so that I can create a Report selecting data between 2 dates.

What I want to do now is to create a new field in the query that displays the actual day of the week (Monday, Tuesday etc). I have tried mucking about with the Weekday function but cannot get it work.

Any help would be appreciated

Thank you

David

PS - OK I found a way using WeekdayName(Weekday([Date])). However the problem now is that it appears to be one day out. eg 30/05/08 shows Saturday when it should be Friday
 
Last edited:
Hi -

Need to rename your field. Date is an Access reserved word (name of a built-in function), e.g.

? date
6/6/2008

Re Bob L.'s solution:

? Format(#5/30/08#,"dddd")
Friday
? Format(#30-May-08#,"dddd")
Friday
? Format(#5/30/09#,"dddd")
Saturday


Works great. Check your input.

Bob A.
 
Last edited:
In a new calculated field in your query

NewFieldName: WeekdayName(Weekday([DateFiledName]))
 
Because that is all I knew:D

But that post was AFTER I had already posted the single function. That's why I was wondering. I guess you might have just skipped over that post of mine and didn't see it.
 
You don't need to do anything in the query, just add an unbound textbox to the Report, set its control source to =[YourDateField], set the display format to "dddd" .
 

Users who are viewing this thread

Back
Top Bottom