Link to home
Start Free TrialLog in
Avatar of shayne23d
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
.
Avatar of Erick37
Erick37
Flag of United States of America image

'Get the day of the week (1 to 7)
Debug.Print Weekday(Now, vbSunday)
'Get the day of the month
Debug.Print DatePart("d", Now)
Avatar of Mikal613
msgbox  Format(Now, "dddd, mmmm dd, yyyy")
ASKER CERTIFIED SOLUTION
Avatar of Mikal613
Mikal613
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
'Get the name of the weekday
Debug.Print WeekdayName(Weekday(Now, vbSunday), False)