How to check current month exits in current year

to check whether july is present in current year

we are in feburary ,july is not present in 2019

how to write condition in uipath

MonthNameStr= “July”

int currentmonth= DateTime.Now.Month
int month = DateTime.ParseExact(MonthNameStr, "MMMM", System.Globalization.CultureInfo.InvariantCulture).Month

If currentmonth < month Then
"Not in this year"
End If


you can use a IF command to do it as follows.

Expression is much similar to what Karthik mentioned…

1 Like

thank you


1 Like