shayne23d
asked on
get the name of the day such as monday.
I am trying to get the day of the week returned programmatically visual basic.
I know how to get the date and time stamp. What I need it to tell me is the date, time and the day of the week. Then I can schedule due dates for projects that span over a weekend.
I know there is the calendar control but I am not using any forms for this project so I do not know what to do
Thanks
.
I know how to get the date and time stamp. What I need it to tell me is the date, time and the day of the week. Then I can schedule due dates for projects that span over a weekend.
I know there is the calendar control but I am not using any forms for this project so I do not know what to do
Thanks
.
'Get the day of the month
Debug.Print DatePart("d", Now)
Debug.Print DatePart("d", Now)
msgbox Format(Now, "dddd, mmmm dd, yyyy")
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
'Get the name of the weekday
Debug.Print WeekdayName(Weekday(Now, vbSunday), False)
Debug.Print WeekdayName(Weekday(Now, vbSunday), False)
Debug.Print Weekday(Now, vbSunday)