hlines_usacs
Creator II
2018-08-15
08:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Duration between two timestamps in hours, minutes, and seconds
Hello, I have two dates (timestamps) and I want to find the duration between the two in the format of hours, minutes, and seconds. For example: 4 hours, 6 minutes, 3 seconds.
Does anyone know how to do this?
Thanks!
6,438 Views
1 Solution
Accepted Solutions
sunny_talwar
MVP
2018-08-15
09:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For the format, you can do this
=Replace(Replace(Replace(Interval(Now() - Today(), 'h@, mm#, ss$'), '@', ' hours'), '#', ' minutes'), '$', ' seconds')
3 Replies
sunny_talwar
MVP
2018-08-15
09:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be use Interval() function
Interval(TimeStamp2 - TimeStamp1, 'hh:mm:ss')
sunny_talwar
MVP
2018-08-15
09:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For the format, you can do this
=Replace(Replace(Replace(Interval(Now() - Today(), 'h@, mm#, ss$'), '@', ' hours'), '#', ' minutes'), '$', ' seconds')
undergrinder
Specialist II
2018-08-15
09:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunny is right, I can only append thatm you can format the string furhter with date function:
=date(interval(date2-date1','s'),'hh mm ss')
6,352 Views