Skip to main content

All Questions

Tagged with
0 votes
1 answer
58 views

How can I calculate a date differential in Python across multiple rows and columns?

I'm trying to calculate the differential between the first Sent date/time in an ID and the last Received date/time in an ID, grouping them by Source and Destination. Sample (named test_subset) looks ...
Qaribbean's user avatar
  • 190
0 votes
3 answers
5k views

Python datetime difference between two dates to seconds (dataframe object) [duplicate]

Python code help needed: I have datetime difference of created and closed date in this format - 01/30/2020 1:55:00 and 01/30/2020 09:44:00. Need to convert the above date format difference to total ...
Senthilkumar Sethuraman's user avatar
0 votes
1 answer
1k views

How to find the time until a certain date in Python, for a specific TimeZone?

I want to create a script that outputs the amount of time remaining (as "X hours, Y minutes, Z seconds remaining") until 27th August 9 AM (in IST). This is what I tried: import datetime delta = ...
Joseph John's user avatar
314 votes
7 answers
353k views

How do I check the difference, in seconds, between two dates?

There has to be an easier way to do this. I have objects that want to be refreshed every so often, so I want to record when they were created, check against the current timestamp, and refresh as ...
alexgolec's user avatar
  • 28.3k