Calculating time between two timestamps in the same column
We were given some raw data from a virtual server and we need to calculate the session duration between 2 events in the same column and we cant figure it out the idea is to get the date from source table and on a formula sheet have the name of the agent, Date, Session Time start, Session Time End and Session duration
Table Source
Desired Table Outcome / Output
Any help will be greatly appreciated we lost the whole day :-(
Answers
-
Hi.
In order to work with hours, minutes an seconds, I think you must change the value (text) in "Connected Time" and "Disconnected Time" to value (number), like:
Hours= VALUE( MID([Connected_Time]1;1;2)
Minutes= VALUE( MID([Connected_Time]1;4;2)
Seconds= VALUE( MID([Connected_Time]1;7;2)
You must use ever the format hh:mm:ss, and in order to facilitate yor calcules, use 24h format.
Next, you can make calcules with this numbers.
Regards
-
So, working this way, you can obtain:
Example of formule (calculation of minutes):
=IF((VALUE(MID([Disconnected Time]1; 4; 2)) - VALUE(MID([Connected Time]1; 4; 2))) > 0; (VALUE(MID([Disconnected Time]1; 4; 2)) - VALUE(MID([Connected Time]1; 4; 2))); (VALUE(MID([Disconnected Time]1; 4; 2)) - VALUE(MID([Connected Time]1; 4; 2))) + 60)
Regards.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!