Hi
I have been trying to find an answer and I just can't solve what should be an easy thing so it is time to ask.
I have a mysql time in hours, minutes seconds. I simply want to subtract the time now from the mysql time to discover how many minutes are left but I have failed after hours.
The problem is time now includes the date as well as the hours. Or it includes the timedelta.
Example:This should be really easy. Can someone help?
I have been trying to find an answer and I just can't solve what should be an easy thing so it is time to ask.
I have a mysql time in hours, minutes seconds. I simply want to subtract the time now from the mysql time to discover how many minutes are left but I have failed after hours.
The problem is time now includes the date as well as the hours. Or it includes the timedelta.
Example:
Code:
def timediff(endtime):#endtime is in the format hours, minutes seconds as a mysql time fieldnow = datetime.datetime.now().time()print(now-endtime)Statistics: Posted by jimseng — Tue Nov 11, 2025 10:44 am