How to compare time in which is in format (0D 0H 0M 0.0S) with a threshold time which has to be a variable. how should i make the variable in this format?


Continuing the discussion from How to assign only time value to variable (Date time Variable) with AM/PM (without date):

Here I have to compare the time which is in format 0D 0H 0M 0.0S with the threshold time which has to be a variable. I took the value of variable has 3H 0M 0.0S(3hrs), here the value of variable can be changed anytime to anything like for example 15M 0.0S(15 mins). I extracted time from the site which is (1H 15M 5.0S) and used split string,after that i am unable to compare this time value with the threshold time, since they are in strings and how many different flows would be here when comparing the time with the variable time. Can anyone plz help?


Hi Vinod, Welcome to the forum!

If possible, convert both thresholdTime and VariableTime to integers and compare ?

thresholdTimeSec = (( (tD*24)+tH)*60+tM)60+tS
variableTimeSec =(( (vD

Above is just clue.

1 Like