I would like to compare current time with a fix time value. How we I can achieve this in UIpath
For Example
fixed_time = 16:00:00;
current_time = 17:30:00;
I want to check->
If(fixed_time>current_time)
{
///Action A
}
else{
Action B
}
Hi there @anshul_nema,
There’s a few ways you can write this, but the below should do the trick:
tspFixed = 17:30:00
If DateTime.Now.TimeOfDay.CompareTo(tspFixed) = -1
* Log - "Local Time Is Greater Than Fixed Time!"
Else
* Log - "Local Time Is Less Than Or Equal To Fixed Time!"
End If