comparing date and hours and minutes in python code example
Example: Date difference in minutes in Python
minutes_diff = (datetime_end - datetime_start).total_seconds() / 60.0
minutes_diff = (datetime_end - datetime_start).total_seconds() / 60.0