Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Fernandez
Creator II
Creator II

Parse Date

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:00

I try with parseDate, parseDateLocale, formatDate... and I did'nt succeed.

Thanks for your help

Labels (4)
9 Replies
Anonymous
Not applicable

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

Fernandez
Creator II
Creator II
Author

Hi,

 

It doesn't work, the format doesn't change.

 

Below the screenshots:

 

0695b00000F7VZLAA3.png 

 

0695b00000F7VZQAA3.png 

Thanks for your help !

 

Anonymous
Not applicable

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

Fernandez
Creator II
Creator II
Author

Hi,

 

With console, it's the same...

 

 

Xml input

 

0695b00000F7fY3AAJ.png 

Mapping

 

0695b00000F7fYIAAZ.png0695b00000F7fYSAAZ.png 

Result

 

0695b00000F7ekOAAR.png 

 

 

gjeremy1617088143

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

Anonymous
Not applicable

hh: hour in AM/PM (01-12), HH: hour in day (00-23), as @guenneguez jeremy​ suggested, change hh to HH.

Fernandez
Creator II
Creator II
Author

Hi,

 

It also doesn't work with HH...

 

0695b00000F89QJAAZ.png 

0695b00000F89QTAAZ.png 

gjeremy1617088143

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.

 

Anonymous
Not applicable

Hi

Change the date pattern of input data to "dd/MM/yyyy hh:mm:ss aa". Please try again.

 

Regards

Shong