IF Condition does not work properly

I have following IF Condition and the bot gives me an error message for the “Else” condition, although it should utilize the “Then” condition, as the current month is January. My point is, that the bot should focus on condition “Then” and not “Else”.

What could be the reason for that?

Hey @maria.mitova ,
this expression DateTime.Now.ToString(“MMM”) return “Jan”.
If you want use word ‘January’ you should change expression to: DateTime.Now.ToString(“MMMM”)

2 Likes

Hi

Mention like this in condition

Datetime.Now.ToString(“MMM”).ToUpper Equals JAN

Cheers @maria.mitova

@maria.mitova :slight_smile:
Here you have also example :+1:
ifDateTimeExample.zip (49.5 KB)

2 Likes