Convert given day to integer

Someone can tell me how to convert given day to integer.
For example, Monday to 1, Tuesday to 2 etc.,


You have to use just two assign activities.

Declare two variables -

myDay as String type
dayNumber As Integer

Assign Activity, myDay = “Monday”
Assign Activity, dayNumber = (CInt([Enum].Parse(GetType(DayOfWeek), myDay)))

Use MessageBox to display dayNumber which displays 1.

Karthik Byggari


Thank you, worked perfectly.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.