Check If Current Time < Fixed Time Variable?

Hey Luecke.

Assign your two input variables (or take them from whatever your input source is):
strNow = datetime.Now.ToString(“hh:mm”)
strFixed = “00:55”

where the latter is your fixed time.

Then you make an if with the following condition:
“datetime.ParseExact(strNow, “hh:mm”, system.Globalization.CultureInfo.InvariantCulture) < datetime.ParseExact(strFixed, “hh:mm”, system.Globalization.CultureInfo.InvariantCulture)”

I’ve attached the workflow for you. Have a good day :slight_smile:

Main.xaml (4.4 KB)

I made a video tutorial about dates and times (datetime) in UiPath. Maybe you can use that for further reference:

9 Likes