Can someone please help me to get the duration in minutes for a start date time and end date time?
Best Answer
-
You can use the TIME function to convert AM/PM time format to 24 format, which makes it easy to calculate duration minutes.
[Time 24] =TIME(RIGHT([Date Time]@row, 8), 1)
[Year] =VALUE(MID([Date Time]@row, 7, 2))+2000
[Month] =VALUE(LEFT([Date Time]@row, 2))
[Day] =VALUE(MID([Date Time]@row, 4, 2))
[Date] =DATE(Year@row, Month@row, Day@row)
[Hour] =VALUE(LEFT([Time 24]@row, 2))
[Minitues] =VALUE(RIGHT([Time 24]@row, 2))
[Time Minutes] =Hour@row * 60 + Minitues@row[Duration: Total in miniutes]# =[Duration: Dates]# * 24 * 60 + [Duration: Minutes]#
format—[optional] [optional] Specifies whether the time is displayed using a 12-hour (0) or 24-hour (1) clock.
Answers
-
You can use the TIME function to convert AM/PM time format to 24 format, which makes it easy to calculate duration minutes.
[Time 24] =TIME(RIGHT([Date Time]@row, 8), 1)
[Year] =VALUE(MID([Date Time]@row, 7, 2))+2000
[Month] =VALUE(LEFT([Date Time]@row, 2))
[Day] =VALUE(MID([Date Time]@row, 4, 2))
[Date] =DATE(Year@row, Month@row, Day@row)
[Hour] =VALUE(LEFT([Time 24]@row, 2))
[Minitues] =VALUE(RIGHT([Time 24]@row, 2))
[Time Minutes] =Hour@row * 60 + Minitues@row[Duration: Total in miniutes]# =[Duration: Dates]# * 24 * 60 + [Duration: Minutes]#
format—[optional] [optional] Specifies whether the time is displayed using a 12-hour (0) or 24-hour (1) clock.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.1K Get Help
- 450 Global Discussions
- 155 Industry Talk
- 505 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 80 Community Job Board
- 514 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 308 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!