Convert a month into word to datetime

how i can convert month and year to datetime formart?

I have “september 2019” and y want compare this month with other to know which one is bigger.

How could I do this?


This is from @Palaniyappan. Hope this helps (10.2 KB)


Hi @Jreco,

  • Consider your first string, Str1 = “september 2019”
  • Second String, Str2 = “October 2019”
  • To convert Str1 to datetime format, just assign a variable of type DateTime, Date1 =System.DateTime.ParseExact(Str1,"MMMM yyyy",system.Globalization.CultureInfo.InvariantCulture)
  • Convert Str2 to DateTime format, Date2 =System.DateTime.ParseExact(Str2,"MMMM yyyy",system.Globalization.CultureInfo.InvariantCulture)
  • Use an “IF activity” with condition Date1 > Date2 . “Then” part will execute if Date1 is bigger and “Else” part will execute if Date2 is bigger.

Please check this workflow. MonthComparison_JRECO.xaml (7.0 KB)

Warm regards,
Nimin :slightly_smiling_face:

1 Like

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