code: def convert_dttm(
      cls,
      target_type: str,
      dttm: datetime,
      db_extra: Optional[dict[str, Any]] = None,
  ) -> Optional[str]:
      sqla_type = cls.get_sqla_column_type(target_type)
  
      if isinstance(sqla_type, types.DateTime):
          return f"""'{dttm.isoformat(timespec="seconds")}'"""
      return None
  
file_path: superset/superset/db_engine_specs/elasticsearch.py
imports: import logging
  from datetime import datetime
  from typing import Any, Optional
  from packaging.version import Version
  from sqlalchemy import types
  from superset.constants import TimeGrain
  from superset.db_engine_specs.base import BaseEngineSpec
  from superset.db_engine_specs.exceptions import SupersetDBAPIDatabaseError, SupersetDBAPIOperationalError, SupersetDBAPIProgrammingError
label_desc: Use image node_id 1 for calling the OpenDistroEngineSpec obj's underlying member method code with example usage: obj.convert_dttm(cls, target_type, dttm, db_extra) and returns: None, str, dttm, str