'Snowflake timestamp conversion issue

I am facing an issue with snowflake when converting a string to timestamp. Here is an example....

SELECT TO_TIMESTAMP('18090322033010','DDMMYYHH24MISS')

can anyone help me to convert this? the output should be 2003-09-18 22:03:3010

Appreciate your help



Solution 1:[1]

Why are you expecting 3010 to be seconds?

Try this:

SELECT TO_TIMESTAMP('180903220330','DDMMYYHH24MISS');

OR this:

SELECT TO_TIMESTAMP('18090322033010','DDMMYYHH24MISSFF');

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Limonka