If you convert all your dates to datetime.date
, you can write the following:
if start <= date <= end:
print("in between")
else:
print("No!")
More Related Contents:
- How to print a date in a regular format?
- Iterating through a range of dates in Python
- How do I get the day of week given a date?
- Parsing date/time string with timezone abbreviated name in Python?
- How do I validate a date string format in python?
- How can I parse a time string containing milliseconds in it with python?
- In Python, how do you convert seconds since epoch to a `datetime` object?
- Check if string has date, any format
- Find the closest date to a given date
- Efficient date range overlap calculation?
- python/pandas: convert month int to month name
- Python module to change system date and time
- Python: give start and end of week data from a given date
- How to compare a list of lists/sets in python?
- python date of the previous month
- Pandas – Number of Months Between Two Dates
- Add one year in current date PYTHON
- Convert numpy.datetime64 to string object in python
- How to compare type of an object in Python?
- changing all dates to standard date time in dataframe
- How to convert Year and Day of Year to Date?
- Is there a function to determine which quarter of the year a date is in?
- How to convert integer into date object python?
- Convert month int to month name in Pandas
- calculate the difference between two datetime.date() dates in years and months
- Formatting “yesterday’s” date in python
- Convert string into Date type on Python [duplicate]
- Resample time series in pandas to a weekly interval
- How to combine year, month, and day columns to single datetime column?
- Get the last day of the month