I have a string '16:40' and I would like to calculate the difference in minutes between this string and now. So assuming now is 16:52, then the difference would be 12 minutes.
I have the following code:
import time
tString = '16:40'
t1 = time.strptime(tString, "%H:%M")
now = time.time()
print (now - t1)
For which get the following type error:
TypeError: unsupported operand type(s) for -: 'float' and 'time.struct_time'
So I'm creating the incorrect type for now - any ideas?!