diff --git a/superset/models/helpers.py b/superset/models/helpers.py index cc3b34ae62..ec2a0a41d9 100644 --- a/superset/models/helpers.py +++ b/superset/models/helpers.py @@ -1314,7 +1314,7 @@ class ExploreMixin: # pylint: disable=too-many-public-methods if sql: return sql - return f'{dttm.strftime("%Y-%m-%d %H:%M:%S.%f")}' + return f"""'{dttm.strftime("%Y-%m-%d %H:%M:%S.%f")}'""" def get_time_filter( # pylint: disable=too-many-arguments self,