Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2006

Tip: Looking for answers? Try searching our database.

Day of week of any date

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stephen English - 25 Oct 2006 07:51 GMT
Please can anyone tell me if there is a way of obtaining the day of the week
from a date
dtMeeting = 25/10/2006
strDay = DayofWeek(dtMeeting)
I want it to return Wednesday in this case!
Thanks
Stephen
Stefan Blom - 25 Oct 2006 08:38 GMT
Try this:

Dim dtMeeting As Date
Dim strDay As String

dtMeeting = "25/10/2006"

strDay = Format$(dtMeeting, "dddd")

Signature

Stefan Blom
Microsoft Word MVP

> Please can anyone tell me if there is a way of obtaining the day of the week
> from a date
[quoted text clipped - 3 lines]
> Thanks
> Stephen
Stefan Blom - 25 Oct 2006 08:44 GMT
Correction: It is best to assign the date value as a date literal. For
example:

dtMeeting = #10/25/2006#

See more about date literals in VBA Help.

Signature

Stefan Blom
Microsoft Word MVP

> Try this:
>
[quoted text clipped - 13 lines]
> > Thanks
> > Stephen
Stephen English - 25 Oct 2006 08:51 GMT
Hi Stefan
Thank you for such a quick reply.  I was just having a mental block!  
Kind regards
Stephen

> Try this:
>
[quoted text clipped - 13 lines]
> > Thanks
> > Stephen
Stefan Blom - 25 Oct 2006 09:09 GMT
You are welcome.

Signature

Stefan Blom
Microsoft Word MVP

> Hi Stefan
> Thank you for such a quick reply.  I was just having a mental block!
[quoted text clipped - 18 lines]
> > > Thanks
> > > Stephen

Rate this thread:






 
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.