Try this:
from datetime import datetime, date
datetime.combine(date.today(), exit) - datetime.combine(date.today(), enter)
combine
builds a datetime, that can be subtracted.
More Related Contents:
- Format timedelta to string
- Adding days to a date in Python
- How to construct a timedelta object from a simple string
- Convert timedelta to years?
- How to add delta to python datetime.time?
- How do you convert a datetime/timestamp from one timezone to another timezone?
- Comparing a time delta in python
- Python: Adding hours to pandas timestamp
- Iterating through a range of dates in Python
- Combine Date and Time columns using python pandas
- datetime to string with series in pandas
- pandas datetime to unix timestamp seconds
- Check if string has date, any format
- Formatting timedelta objects [duplicate]
- How to convert a python datetime.datetime to excel serial date number
- matplotlib bar chart with dates
- How to add timezone into a naive datetime instance in python [duplicate]
- Parsing datetime in Python..?
- Convert numpy.datetime64 to string object in python
- Removing the timestamp from a datetime in pandas dataframe
- Subtract a year from a datetime column in pandas
- Pandas: How to create a datetime object from Week and Year?
- How to convert epoch time with nanoseconds to human-readable?
- Python pandas cumsum() reset after hitting max
- How to convert Python’s .isoformat() string back into datetime object [duplicate]
- Python summing up time
- Ceil a datetime to next quarter of an hour
- Clean way to convert quarterly periods to datetime in pandas
- pandas extract year from datetime: df[‘year’] = df[‘date’].year is not working
- Python Pandas : pandas.to_datetime() is switching day & month when day is less than 13