How to store difference between start time and end time in HH:MM:SS format.

I am trying to store difference between startTime & endTime  attribute in diffBetTime attribute (HH:MM:SS). what should be the data type of diffbetTime and how to calculate expected result in appropriate format? check below image for reference..  as i have done it In microflow using minutesBetween but i want eaxact HH:MM:SS format  
3 answers

It should be a decimal indeed.
In a MF you can use the function minutesBetween

More info on this is in the documentation:


Hi Darshana,

you can create a microflow that recieves a customer. And the you can create a variable with this value:

This gives you the total of seconds between those dates. The you can transform it into (HH:MM:SS). I saw this idea in

Even this link can help you in the next steps:

I hope this can help you.

Best regards!


There is no straight forward way to transform the difference into (HH:MM:SS). You will need to follow these steps in a microflow:

  1. S1=secondsBetween(Date1, Date2)
  2.  H1= S1/3600 
  3. HH= round(H1,0)
  4. M1=  (H1-HH)*60
  5. MM= round(M1,0)
  6. SS=round((M1-MM)*60,0)
  7.  Date Difference = toString(HH)+’:’+toString(MM)+’:’toString(SS)