in below I got datetime.date and datetime.datetime class.
start=df.index[0]
start_input_1=datetime.strptime(start_input[:10],'%Y-%m-%d')
print(start_input[:10])
print(type(start))
print(type(start_input_1))
2021-09-01
<class 'datetime.date'>
<class 'datetime.datetime'>
Now if I below comparison, then I got an error of
cannot compare datetime.datetime to datetime.date
if start_input_1>=start:
start_plot=start_date_input_1
so how do I convert datetime.date into datetime.datetime so I can compare two dates?
if I use pd.to_datetime(), it is converted to timestamp instead of datetime. Thanks for your help.
start=pd.to_datetime(start)
print(start)
class 'pandas._libs.tslibs.timestamps.Timestamp'