There is a cast function that is being used in a Teradata procedure as
cast(<col_name> AS DATE FORMAT 'MM/DD/YY'
It is giving me output as DATE datatype of format 'MM/DD/YY'. I am trying to use similar function in SNOWFLAKE so that it would give me same output. I tried something like this
TO_CHAR(TO_DATE(<col_name>,'MM/DD/YY')
It is giving me output in that format as well, but whenever I am running the Snowflake procedure, different result is getting inserted in the table. This is because my code is giving me result in varchar datatype while the column is of Date datatype. Any idea on how to do this conversion would be highly appreciated.