I have to revert a date conversion At the beginning it was
CAST(FROM_UNIXTIME(UNIX_TIMESTAMP(t0.date_creation , 'yyyyMMdd'T'hhmmss')) AS TIMESTAMP)
Now I'm looking on how to convert a timestamp to the format 'yyyyMMdd'T'hhmmss'
the syntax CAST(date_creation as string format 'yyyy-MM-dd hh:mm:ss')
is not working
Use
date_format
function:Returns:
Read about format here: SimpleDateFormat