Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys,
Can someone knows the date format for the below example:
2022-02-14 09:55:36.049 +0100
The sql ddl of this field is "DATE_INSERTION TIMESTAMP_LTZ(9)," in the database.
I have tried the below solution but it is not working:
Pattern: "yyyy-MM-dd HH:mm:ssXXX"
2022-02-14 12:55:36.049+04:00
+ the output in bold is not good too.
Can someone help please?
Thank you.
Best regards,
RA
Hi
Try this
"yyyy-MM-dd HH:mm:ss.SSSXXX"
Regards
Shong
Also check the documentation on what kind of patterns there are:
https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
@Shicong Hong
Hello Shong,
I have tried the two format below, the date pattern are OK.
They are both giving me the same result:
"yyyy-MM-dd HH:mm:ss.SSS XX"
"yyyy-MM-dd HH:mm:ss.SSS Z"
Result:
2022-02-14 12:55:36.049 +0400
But what bothers me, the is two highlighted "12" and "04", beacause my input date is:
2022-02-14 09:55:36.049 +0100
Can you advice please?
Thank you.
Best regards,
RA
Hi @Rohit Aftab maybe your issue come from to different Timezone between the server of your db and your etl server. in the DB you have a LTZ format for local time zone.