If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Date
Is there a way to determine what day a date is from a Date() so I can use it
in a formula? Like 5/21/2005 is a Saturday and 5/22/2005 is a Sunday. I noticed that the Calendar in the form has a selection for what day to display first. I would imagine there must be away since the calendar knows. |
#2
|
|||
|
|||
Weekday(Date)
the above will give you the day of the week as a number; default setting is Sunday = 1. if you want to return the day's name, you can use Choose(Weekday(Date), "Sunday", "Monday", "Tuesday", "Wednsday", "Thursday", "Friday", "Saturday") note, the above should all be on one line. btw, you can change the first day of the week from Sunday to any other day if you want. see the Weekday Function topic in Help. hth "Fred" wrote in message newsGMje.786$rr.214@fed1read01... Is there a way to determine what day a date is from a Date() so I can use it in a formula? Like 5/21/2005 is a Saturday and 5/22/2005 is a Sunday. I noticed that the Calendar in the form has a selection for what day to display first. I would imagine there must be away since the calendar knows. |
#3
|
|||
|
|||
"tina" wrote in message
news Weekday(Date) If you want to return the day's name, you can use Choose(Weekday(Date), "Sunday", "Monday", "Tuesday", "Wednsday", "Thursday", "Friday", "Saturday") Or, more simply, Format(Date, "ddd") or Format(Date, "dddd") This also has the advantage (I believe) that it will display the date in the user's language (and will spell Wednesday correctly! g) -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) |
#4
|
|||
|
|||
you're right, Doug, on both counts! g
"Douglas J. Steele" wrote in message ... "tina" wrote in message news Weekday(Date) If you want to return the day's name, you can use Choose(Weekday(Date), "Sunday", "Monday", "Tuesday", "Wednsday", "Thursday", "Friday", "Saturday") Or, more simply, Format(Date, "ddd") or Format(Date, "dddd") This also has the advantage (I believe) that it will display the date in the user's language (and will spell Wednesday correctly! g) -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Date question | Spectra | Running & Setting Up Queries | 5 | March 22nd, 2005 12:30 PM |
Revised Date Question | Spectra | Running & Setting Up Queries | 0 | March 18th, 2005 12:19 PM |
Not Allow Date Past This Thursday | Dave Elliott | Using Forms | 4 | November 1st, 2004 09:39 PM |
Calendar Object | Steve | Setting Up & Running Reports | 1 | May 18th, 2004 04:44 PM |
Formatting dates in Excel | bernrunner15 | New Users | 4 | May 11th, 2004 10:32 PM |