Subtract Timestamp
Posted: Thu Sep 14, 2017 1:09 pm
I have a requirement to subtract two timestamps and store the value in output field
Output
Process_duration - Varchar(20)
Formula-
CurrentTimestamp()-DsJobStartTimestamp
CurrentTimestamp() - 2017-09-14 08:37:59
DsJobStartTimestamp=2017-09-14 08:37:42
Output should be 00:00:17
I tried this option
TimeToString (TimestampToTime(CurrentTimestamp())-TimestampToTime(DSJobStartTimestamp),"%hh:%nn:%ss") ===> but compilation is throwing error of '. Invalid conversion requested from a dfloat to a time'
What is the mistake I am doing? Please let me know.
Output
Process_duration - Varchar(20)
Formula-
CurrentTimestamp()-DsJobStartTimestamp
CurrentTimestamp() - 2017-09-14 08:37:59
DsJobStartTimestamp=2017-09-14 08:37:42
Output should be 00:00:17
I tried this option
TimeToString (TimestampToTime(CurrentTimestamp())-TimestampToTime(DSJobStartTimestamp),"%hh:%nn:%ss") ===> but compilation is throwing error of '. Invalid conversion requested from a dfloat to a time'
What is the mistake I am doing? Please let me know.