Forum Discussion

ChrisCollins's avatar
ChrisCollins
Qrew Trainee
9 years ago

Calculating the difference between date/time fields? My calc using Date/Time fields is [Finish Date/Time] - [Start Date/Time] -I need my result to show hours:minutes...

I have an app that's tracking how much time my newborn son is sleeping and I need to calculate the difference between the finish time and start time and account for the time between 2 different days. More specifically, if he falls asleep at 23:30 on a Saturday and awakes at 03:00 on a Sunday i need my result to show 3.5 hours. 

I'm using two Date/Time fields with a formula of [Finish Date/Time]-[Start Date/Time] but my result is is something like this: 12-31-1969 07:32 PM. 

Any help would be appreciated...
  • I was researching questions already asked and came across this one.  this wasn't helpful in anyway so I agreed with Jeff from 2 months ago, that way others who made need help with this subject would know that this article was pretty much not helpful.  

    I would rather research my question first before submitting an identical (or close to identical one) in the forum rather than waste other peoples time re-answering a question that was already asked previously.

    Now both of us have wasted our time on an article and replies that are not help to either one of us. 

    Oh and P.S. I did find the answer I was looking for in another post, and am going to try it to see if it works for us.
  • This is what we're going to try, will let you know if it works for us..

    ToTimestamp([IssueDate])-ToTimestamp([Resolveddate]) 
  • Stephen, you should be able to use a formula duration field type  and set the units to display as HH:MM

    [Finish Date/Time]-[Start Date/Time]
  • Thank you, I will try this out and get back with you.  I appreciate the help.