How do I calculate the difference in time in minutes for the following timestamp in Python?
2010-01-01 17:31:22
2010-01-03 17:31:22
Use datetime.strptime()
to parse into datetime instances, and then compute the difference, and finally convert the difference into minutes.