def METHOD_NAME(
    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.Date):
        return f"TO_DATE('{dttm.date().isoformat()}', 'yyyy-MM-dd')"
    if isinstance(sqla_type, types.TIMESTAMP):
        datetime_formatted = dttm.isoformat(sep=" ", timespec="seconds")
        return f"""TO_TIMESTAMP('{datetime_formatted}', 'yyyy-MM-dd HH:mm:ss')"""
    return None