Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / August 2006

Tip: Looking for answers? Try searching our database.

Day of week

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gda - 14 Aug 2006 23:03 GMT
I need to calculate the day of the week for a date/time field in a query.

For example, DOW([Start Date]) would return "Wednesday" if the value for
that record were 8/9/06 00:00.
Jeff Boyce - 14 Aug 2006 23:34 GMT
Have you checked Access HELP?  I believe there's already a function that
returns the day-of-week-name of a date.

Regards

Jeff Boyce
Microsoft Office/Access MVP

>I need to calculate the day of the week for a date/time field in a query.
>
> For example, DOW([Start Date]) would return "Wednesday" if the value for
> that record were 8/9/06 00:00.
gda - 14 Aug 2006 23:57 GMT
> Have you checked Access HELP?  I believe there's already a function that
> returns the day-of-week-name of a date.
[quoted text clipped - 3 lines]
> Jeff Boyce
> Microsoft Office/Access MVP

Yes, I have been through the help over and over and can't find it.  I'm
sure, too, that it exists.  I've searched:  "day of week", "query day" and
even "query date field" and get nothing on day of week.  If you know the
function name, I'll figure it out from there.  I tried "DOW([field]) and it
says "Undefined function DOW".

> >I need to calculate the day of the week for a date/time field in a query.
> >
> > For example, DOW([Start Date]) would return "Wednesday" if the value for
> > that record were 8/9/06 00:00.
Jeff Boyce - 15 Aug 2006 00:16 GMT
WeekdayName Function

Description

Returns a string indicating the specified day of the week.

Regards

Jeff Boyce
Microsoft Office/Access MVP

>> Have you checked Access HELP?  I believe there's already a function that
>> returns the day-of-week-name of a date.
[quoted text clipped - 17 lines]
>> > for
>> > that record were 8/9/06 00:00.
Allen Browne - 15 Aug 2006 05:07 GMT
Jeff, perhaps we should suggest gda uses Weekday(), since WeekDayName() was
not in earlier versions, doesn't work properly in Access 2000, and gives
inconsistent results depending on your regional settings:
   http://allenbrowne.com/ser-36.html#WeekdayName

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> WeekdayName Function
>
[quoted text clipped - 29 lines]
>>> > for
>>> > that record were 8/9/06 00:00.
Jeff Boyce - 15 Aug 2006 17:42 GMT
Allen

If the name of the day-of-week is needed, and WeekDayName() is inconsistent,
I'll go for recommending using Format(), with "dddd", to get the day name.

Regards

Jeff Boyce
Microsoft Office/Access MVP

> Jeff, perhaps we should suggest gda uses Weekday(), since WeekDayName()
> was not in earlier versions, doesn't work properly in Access 2000, and
[quoted text clipped - 35 lines]
>>>> > for
>>>> > that record were 8/9/06 00:00.
John Vinson - 15 Aug 2006 00:40 GMT
>I need to calculate the day of the week for a date/time field in a query.
>
>For example, DOW([Start Date]) would return "Wednesday" if the value for
>that record were 8/9/06 00:00.

The function is named Weekday (rather than DOW); or you can use

=Format([Start Date], "dddd")

                 John W. Vinson[MVP]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.