I Need to be able to return the day of the week (e.g.Monday,Tuesday etc) from a give date(e.g. 12/09/2001).
Is there a function or anyway at all that I can do this
intDay = DatePart("w",now(),vbSunday)
select case intDay
case 1
strDay = "Sunday"
case 2
strDay = "Monday"
case 3
strDay = "Tuesday"
case 4
strDay = "Wednesday"
case 5
strDay = "Thursday"
case 6
strDay = "Friday"
case 7
strDay = "Saturday"
end select
msgbox strday
It`s a bit long but it works. For the name of the month you can use:
monthname(Month(now()))
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.