HH:MM:SS Local variable

I'd like to use a local variable to store the HH:MM:SS value for a delay timer. I see an option for Date/Time, but when I delete the date portion the variable is reduced to two values. Can't tell if it's HH:MM or MM:SS, but regardless it won't work for a delay that's expecting HH:MM:SS. Anyone have a solution?

It's HH:MM - Could always store it as string, but not sure how your delay time is going to like that either.

1 Like

Note that, internally at least, DateTime variables are capable of millisecond precision:

The question boils down to, "How do I assign the MM:SS.mmm value I need?"

Clue: Epoch Time ◄— no promises here, as I've never actually seen a DateTime variable displayed with Seconds in the context you're working with . . .

FWIW, running this quick test in RM to calculate the "Time Difference" between two timestamps around ~70 seconds apart, shows that the quantity is being rounded to the nearest minute:

1 Like

Note that using a local variable of type Number or Decimal works fine (at least will not throw an error in the Logs) if you apply it this way in RM5.1:

I submit that to you for further testing with your own setup.

Bear in mind that in this arrangement, Delay will be taken to mean Seconds, so a value of 1 will delay the action by exactly 1 second.

Thanks. That works!

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.