IICS TO_DATE() function formatting question

543 Views Asked by At

I have an expression transformation which takes a UTC format string and transform it to datetime object like this:

 to_date(SUBSTR(from,0,10) || ' ' || SUBSTR(from, 12,8),'YYYY-MM-DD HH24:MI:SS')

However, when I check the result, it is not in the format I declared, this is the result:

"06/01/2023 10:00:00"

Note that this is the input:

"2023-06-01T10:00:00.00Z"

My purpose is actually adding 1 day to the input, I want to change the 2023-06-01T10:00:00.00Z to 2023-06-02T10:00:00.00Z. But to do that, I need to first convert the string to date object so that I can use the ADD_TO_DATE() function to add 1 day, that's why I am converting the UTC string to date object here.

Thank you so much.

0

There are 0 best solutions below