Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Convert 12 Hour Format Date to 24 Hour Date Format

Hi -
I would like to convert add hours to a 12 Hour Format date so that it goes to next day when required. However by using the TalednDate.addDate fuction in my tMap as follows, its still not going to next day when required and just ading the hours in 24 hours format). Can you please let me know if I am missing something?

Source: "2015-12-10 11:08:00.003 PM"
tmap: TalendDate.addDate(TalendDate.parseDate("yyyy-MM-dd HH:mm:ss",row1.mydatetime) ,4,"HH")  

Current Output:   "2015-12-10 17:08:00"
Expected output: "2015-12-11 05:08:00 AM"

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi  
The error occurs on tRowGenerator, please upload some screenshots of the component settings and provide external informations, so that we can continue to help you.

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Try this expression:
TalendDate.addDate(TalendDate.parseDate("yyyy-MM-dd hh:mm:ss.SSS aa",row1.mydatetime) ,4,"HH")  
Anonymous
Not applicable
Author

Hi,

I tried the same but this error came..

Exception in component tRowGenerator_1

may i know why?
Anonymous
Not applicable
Author

Hi  
The error occurs on tRowGenerator, please upload some screenshots of the component settings and provide external informations, so that we can continue to help you.
Anonymous
Not applicable
Author

Thanks a lot shong that works.