Python Forum
Need to sum up HHMMS AM/PM DD/MM/YYYY and a HH:MM:SS.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need to sum up HHMMS AM/PM DD/MM/YYYY and a HH:MM:SS.
#1
Greetings!
I have a time string, it shows the time something started running:
08:31:27 PM 01/02/2023
And the total 'HH:MM:SS' it took to finish the run:
01:22:14
I need to create the ‘finished running’ string by adding the HH:MM:SS to the 08:31:27 PM 01/02/2023.

Should I split the ‘start string’, get the hh:mm:ss, and convert that to total seconds?
Then convert to seconds the “finish run” to seconds.
Sum up both seconds, convert the total seconds to HH:MM:SS, and add the Date time to that.
All of it would look like this:
08:31:27 PM 01/02/2023, 09:53:41 27 PM 01/02/2023

It will work but I do not like how it looks, kind of ugly… Sad
Any thoughts on this?
Thank you.
Reply


Messages In This Thread
Need to sum up HHMMS AM/PM DD/MM/YYYY and a HH:MM:SS. - by tester_V - Jan-04-2023, 07:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  regex to extract only yy or yyyy metalray 2 3,636 Jul-11-2018, 07:57 PM
Last Post: volcano63

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020