diff --git a/superset/utils/date_parser.py b/superset/utils/date_parser.py index a72d49fbf47aa..76a13696952ef 100644 --- a/superset/utils/date_parser.py +++ b/superset/utils/date_parser.py @@ -324,7 +324,9 @@ def eval(self) -> datetime: month=1, day=1, hour=0, minute=0, second=0, microsecond=0 ) if unit == "quarter": - dttm = pd.Period(pd.Timestamp(dttm), freq="Q").to_timestamp() + dttm = ( + pd.Period(pd.Timestamp(dttm), freq="Q").to_timestamp().to_pydatetime() + ) elif unit == "month": dttm = dttm.replace(day=1, hour=0, minute=0, second=0, microsecond=0) elif unit == "week":