Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have to modify the date format of a tag in a xml file.
The date is in format : 03/05/2021 7:00:00 PM
and I want to get it in format :
03/05/2021
19:00:00I try with parseDate, parseDateLocale, formatDate... and I did'nt succeed.
Thanks for your help
Hi
What's data type of this column? Assuming it is date type, change its date pattern to "dd/MM/yyyy HH:mm:ss" on the schema.
Regards
Shong
Hi,
It doesn't work, the format doesn't change.
Below the screenshots:
Thanks for your help !
Hi
I think this is a date display format issue in target Oracle DB, if you print the data on the console, you will see that the data display as you expected, you can change the date display format in DB, please refer to Oracle documentation.
Regards
Shong
Hi,
With console, it's the same...
Xml input
Mapping
Result
Hi, just use HH instead of hh for hours in the output date pattern.
I just try it in a tjavarow and it works :
input : 03/05/2021 7:00:00 PM
output : 2021-05-03 19:00:00
Send me Love and Kudos
hh: hour in AM/PM (01-12), HH: hour in day (00-23), as @guenneguez jeremy suggested, change hh to HH.
Hi,
It also doesn't work with HH...
can you try it on a tjavarow instead of TMap, you are on open studio : maybe TMap date pattern have a bug, if you have the same issue with tJavarow maybe all date pattern have a bug in your version of open studio. Sometime there is cache issue with tmap you have to delete it and make a new one.
Hi
Change the date pattern of input data to "dd/MM/yyyy hh:mm:ss aa". Please try again.
Regards
Shong