How to replicate week number that was generated using Redshift's to_char on Snowflake? – Amazon web services
I'm trying to migrate a Redshift SQL script to Snowflake and trying to emulate week number on Snowflake. Below is the sample Redshift code: select cast(to_char('2020-01-06'::date, 'WW') as int) as week, cast(to_char('2020-01-06'::date, 'IW') as int) as iso_week, '2020-01-06'::date; The closest…