Dear Windu,
Not sure if there is an easier way to solve it, i always overcome this issue by playing with the characters.
In this case your could try something like (replace all the example dates with your datetime column):
Edit:
Just found an easier way:
SELECT TO_CHAR(TO_TIMESTAMP('28-01-2022 13:51:24', 'DD-MM-YYYY HH:MI:SS'), 'YYYY-MM-DD HH:MI:SS')
Yours,
Zsolt Borbely
Dear Windu,
Try to do this in Extraction level, please let us know if it resolved by following this.
Dear Windu,
Not sure if there is an easier way to solve it, i always overcome this issue by playing with the characters.
In this case your could try something like (replace all the example dates with your datetime column):
Edit:
Just found an easier way:
SELECT TO_CHAR(TO_TIMESTAMP('28-01-2022 13:51:24', 'DD-MM-YYYY HH:MI:SS'), 'YYYY-MM-DD HH:MI:SS')
Yours,
Zsolt Borbely
Dear Zsolt,
Thank you for for you support. This query is working for 1 conversion date. Do you have any idea if need to convert 1 column?
I have column 'event' in table 'Incident'. All data in column 'event' use format datetime with 'DD-MM-YYYY HH:MI:SS'
But I need to convert the format in the transformation became YYYY-MM-DD HH:MI:SS, because the data model used this format (YYYY-MM-DD HH:MI:SS).
if you have any info, this is highly appreciated
Thank You Zsoft
Kind Regards,
Windu
Dear Windu,
Try to do this in Extraction level, please let us know if it resolved by following this.
Dear Sravana
Thanks a lot for your insight. Please correcting me, this menu is on the extraction -> choose the table -> configuration. Am I correct?
but I am not sure why for mine, there is no formatting on the right of 'DATETIME' as yours:
Any idea maybe?
Thank you Sravana
Kind Regards,
Windu
Dear Zsolt,
Thank you for for you support. This query is working for 1 conversion date. Do you have any idea if need to convert 1 column?
I have column 'event' in table 'Incident'. All data in column 'event' use format datetime with 'DD-MM-YYYY HH:MI:SS'
But I need to convert the format in the transformation became YYYY-MM-DD HH:MI:SS, because the data model used this format (YYYY-MM-DD HH:MI:SS).
if you have any info, this is highly appreciated
Thank You Zsoft
Kind Regards,
Windu
Dear Windu,
You have to cast the column to timestamp in order to detect it as a date:
TO_CHAR(TO_TIMESTAMP("incident"."event", 'DD-MM-YYYY HH:MI:SS'), 'YYYY-MM-DD HH:MI:SS')::TIMESTAMP
Replace the bold part in the code to your table.column name.
Hope it helps. In case of further questions feel free to reach out.
Yours,
Zsolt Borbély