Day of week of any date

S

Stephen English

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
 
S

Stefan Blom

Try this:

Dim dtMeeting As Date
Dim strDay As String

dtMeeting = "25/10/2006"

strDay = Format$(dtMeeting, "dddd")

--
Stefan Blom
Microsoft Word MVP


in message
news:D[email protected]...
 
S

Stefan Blom

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.

--
Stefan Blom
Microsoft Word MVP


in message
 
S

Stephen English

Hi Stefan
Thank you for such a quick reply. I was just having a mental block!
Kind regards
Stephen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top