Trying to replicate the below Mysql expression in snowflake but facing issues with the same , The same works perfectly for me in mysql.
SELECT STR_TO_DATE(CONCAT('201439',' Sunday'), '%X%V %W');
Please see below the sample query and the output the below works in Mysql .
SELECT STR_TO_DATE(CONCAT('201439',' Sunday'), '%X%V %W');
Output -- 2014-09-28
SELECT STR_TO_DATE(CONCAT('201440',' Sunday'), '%X%V %W');
output -- 2014-10-05
SELECT STR_TO_DATE(CONCAT('202313',' Sunday'), '%X%V %W');
output -- 2023-03-26
Where 202313 is the year and the Week no , Sunday is the Weekstart day and the returned output "2023-03-26" would be the week start date.
struggling to get the alternative for the same in snowflake.
There is no function for that by default, but you can create one of your own for this, like for example:
When calling it:
See more information here.