Max Gekk created SPARK-44868: -------------------------------- Summary: Convert datetime to string by `to_char`/`to_varchar` Key: SPARK-44868 URL: https://issues.apache.org/jira/browse/SPARK-44868 Project: Spark Issue Type: New Feature Components: SQL Affects Versions: 4.0.0 Reporter: Max Gekk Assignee: Max Gekk
Expand {{to_char()}} to take date and timestamp expression as the first argument. For date and timestamp expression, the function will be equivalent to {{date_format(expr, fmt)}} The goal is to achieve feature parity with other systems, and make the migration to Spark SQL easier: - Snowflake: https://docs.snowflake.com/en/sql-reference/functions/to_char - PostgreSQL: https://www.postgresql.org/docs/current/functions-formatting.html - MariaDB: https://mariadb.com/kb/en/to_char/ - DB2: https://www.ibm.com/docs/en/db2/11.5?topic=sf-char - Exasol: https://docs.exasol.com/db/latest/sql_references/functions/alphabeticallistfunctions/to_char%20(datetime).htm -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org