For example, the inputs are 20240703193312 and 20240703203312, I'm trying to reach a result of 01:00:00 meaning one hour difference between the two inputs (20240703203312-20240703193312).
Can someone please help? Thank you so much!
Solved! Go to Solution.
note - your field must a be a string going into datetimeparse - so make sure you convert before or wrap it in tostring()
formula tool - 3 formulas
new datetime[datefield1] - repeat for new datetimetime[datefield2]
datetimeparse([field],"%Y%m%d%H%M%S")
difference field
datetimediff([datefield1],[datefield2],"hours")
to convert this to time you'd use:
datetimeadd('1970-01-01 00:00:00',tonumber(datetimediff([datefield2],[datefield1],"Hours")),"Hours")
in a new time field.
slight modifications to include a date and to have datefield2 first.
@Emmm
find the workflow attached
mark done if solved.
Thank you both!! @Raj @apathetichell