A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Date



 
 
Thread Tools Display Modes
  #1  
Old May 21st, 2005, 07:28 PM
Fred
external usenet poster
 
Posts: n/a
Default 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  
Old May 21st, 2005, 09:32 PM
tina
external usenet poster
 
Posts: n/a
Default

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  
Old May 21st, 2005, 10:59 PM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default

"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  
Old May 22nd, 2005, 03:17 AM
tina
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 11:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.