datetimerangefield

to fetch the data's from website from 00.00 - 7.00AM(EST) IN PYTHON datetimerange using between condition

天涯浪子 提交于 2019-12-02 15:42:45
问题 published_date = 7/11/2019 at 06:04 AM,7/11/2019 at 1:04 AM,7/11/2019 at 5:36 AM,7/11/2019 at 04:00 PM All times are in EST. I need to fetch data from time range of 00.00 - 07.00 AM(EST) .It should skip the time above 7.00AM(EST) if published_date.time() <= 7:00AM print(published_date.time()) Actual results: published_date = 7/11/2019 at 06:04 AM,7/11/2019 at 1:04 AM,7/11/2019 at 5:36 AM,7/11/2019 at 04:00 PM Expected results: published_date = 7/11/2019 at 06:04 AM,7/11/2019 at 1:04 AM,7/11

to fetch the data's from website from 00.00 - 7.00AM(EST) IN PYTHON datetimerange using between condition

谁都会走 提交于 2019-12-02 10:38:21
published_date = 7/11/2019 at 06:04 AM,7/11/2019 at 1:04 AM,7/11/2019 at 5:36 AM,7/11/2019 at 04:00 PM All times are in EST. I need to fetch data from time range of 00.00 - 07.00 AM(EST) .It should skip the time above 7.00AM(EST) if published_date.time() <= 7:00AM print(published_date.time()) Actual results: published_date = 7/11/2019 at 06:04 AM,7/11/2019 at 1:04 AM,7/11/2019 at 5:36 AM,7/11/2019 at 04:00 PM Expected results: published_date = 7/11/2019 at 06:04 AM,7/11/2019 at 1:04 AM,7/11/2019 at 5:36 AM Your date are not in correct format. Hence it will not parse and compare it correct. You