I was wondering if there was a way to directly convert the integer DayOfWeek
returns into a string representing the day like Monday, Tuesday etc.
Sample code:
MessageBox.Show(Date.Today.DayOfWeek)
This will return 6
(as of today). Is there a way to directly convert this into Saturday
, for example? I don't really care what it really converts it into, but I want to do away with my Select Case:
Select Case Date.Today.DayOfWeek
Case 1
day = "Monday"
Case 2
day = "Tuesday"
Case 3
day = "Wednesday"
Case 4
day = "Thursday"
Case 5
day = "Friday"
Case 6
day = "Saturday"
Case 7
day = "Sunday"
Case Else
day = "Apocalypse: we're all boned."
End Select
Thanks :)