[BUG]: dateformat 'yyyymmdd' throwing error while executing the code in Databricks DBSQL #1186
Open
1 task done
Labels
bug
Something isn't working
Is there an existing issue for this?
Category of Bug / Issue
Other
Current Behavior
Snowflake code input: to_char(pos.createdwhen,'yyyymmdd')
Databricks code output: TO_CHAR(pos.createdwhen, 'yyyymmdd')
Expected Behavior
Databricks code output: TO_CHAR(pos.createdwhen, 'yyyyMMdd')
Steps To Reproduce
In snowflake environment:
select to_char(current_timestamp(),'yyyymmdd'); --output: 20241112
In databricks environment:
select to_char(current_timestamp(),'yyyymmdd'); --output: 20240012
while
select to_char(current_timestamp(),'yyyyMMdd'); --output: 20241112 [correct output with format 'yyyyMMdd' ]
Relevant log output or Exception details
No response
Sample Query
No response
Operating System
macOS
Version
latest via Databricks CLI
The text was updated successfully, but these errors were encountered: