Days of Week

kbreiss

Registered User.
Local time
Today, 21:28
Joined
Oct 1, 2002
Messages
228
This is a long shot here....but thought I would ask. Is there any way to calculate what the day of the week would be from a date? For example, a calculation that would tell me 07/01/03 is on a Tuesday. I've never seen this or have read anything about, but thought I would try.

Thanks,
Kacy
________
**** Ring
 
Last edited:
The Format() function will do that for you. Look up Format (with the VBA window open so you get the right version of help). Then look at the "See Also" list. Choose the "User defined Date/Time formats".

I am pointing you to the relevant help entry rather than simply answering the question because there is a lot to learn about the Format() function. Make it your friend. Print out the help entries that contain the various argument values and post them on the wall behind you so they are always handy.
 
Also, there's the WeekDay() function that returns a number between 1 and 7, each number representing a specific day of the week: 1 = Sunday through to 7 = Saturday.
 
ok, I've read through several of the format() functions and I'm still having trouble. Here's what I got.....I have an Appointment table that users enter in the date in the future (i.e. 08/01/03). I also have a scheduled times table that says.....for example, facility 1 can only schedule two appointments on Wednesdays at 9:00am. Currently users have to print out the appointments report and check the dates compared to the day of the week that that date is on and verify they haven't overscheduled for that day and for that time. I'm trying to do a query that changes the date of the appoinement (08/01/03) to an actual day in the query so I can run like a verification report. I guess my question is the examples you guys gave me possible to do in a query or only in VB?

Thanks for your input,
Kacy
________
How to make a vaporizer
 
Last edited:
myDate = #7/01/03#

? format(weekday(myDate), "ddd")
Tue

? format(weekday(myDate), "dddd")
Tuesday
 

Users who are viewing this thread

Back
Top Bottom