Time Comparison

Anyone can help me the solution of comparing the time?

I want the logic would be

if (current time < 02:00)
do this

I can’t find a solution for the time. Date is easy but with the time I can’t find solution.

Try converting the DateTime variable to String first, and then comparing the strings.

The String format should be HH:mm:ss


Thanks @ashapkina

That helps I now able to get what I need.

I implemented a custom script after converting


1 Like