I have a date field in one of my tables that's formatted like this: 20220212.
I want to CAST it like this: 2022/02/12 but a simple CAST(DATE_FIELD AS DATE) doesn't seem to work. ANyone know how I can achieve this with SQL in Snowflake?
Thanks!
CodePudding user response:
Please try to_date()
to_date(DATE_FIELD, 'YYYY/MM/DD')