I included a FORMAT command in one of the last builds of TWX 2.05, though I'm not sure if it's present in any of the versions floating around. You'll have to try this example to see if it compiles. The syntax is as follows:
format InputVar OutputVar CONSTANT
The constant of interest here is STRTODATETIME, which will convert a date and time value to a real number, representing days elapsed since the beginning of 1900... including the fractional part. So to determine the time elapsed between two string values, you'd do something like this:
Code:
format "4/27/2013 14:20:00" $dateTime1 STRTODATETIME
setVar $now DATE & " " & TIME \\ date and time are TWX constants
format $now $dateTime2 STRTODATETIME
setPrecision 10
setVar $elapsed ($dateTime2 - $dateTime1)
echo "*Elapsed: " $elapsed
Lines 2 and 3 could be combined, but I've written them this way for clarity. You would need to convert the resulting fractional part to hours, minutes, and seconds if required.