Can't convert CURRENT_TIMESTAMP to specified format

I’m trying to do a simple date conversion and I keep getting a malformed error.


Error I’m getting:

FUNCTION ERROR: Input text cannot be formatted to date Details Invalid format: "2019-03-28" is malformed at "-03-28" Input text 2019-03-28 SqlOperatorImpl PROJECT Location 1:0:3 SqlOperatorImpl PROJECT Location 1:0:3 Fragment 1:0

Not sure what the issue is. This should be super simple.

I want to convert to ISO standard. ‘YYYYMMDD’


TO_DATE converts text to a date and the argument should be the format to use when parsing the text. In your case it looks like the text is of format YYYY-MM-DD.

1 Like

Thanks for your quick response @doron

So looking through the docs

It looks like there isn’t a function similar to Convert() in SQL Server.

You can then use TO_CHAR(“column”, ‘YYYYMMDD’) to convert it to the ISO standard string representation.