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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to convert a special date

Hello ,

 

I need to convert this kind a date below in date format please .

My code below isn't working .

 

Can you help me please

 

TalendDate.formatDate("yyyy-MM-dd", TalendDate.parseDate("MMM dd';' yyyy HH:mm:ss", row1.newColumn1 )  

 

the date to convert .(date in the row1.newColumn1)

 

Dec 1; 2016 00:00:00

 

Best regards 

Capsi

Labels (2)
11 Replies
cterenzi
Specialist
Specialist

While I would not have used a tMap variable in this case--instead I put the date expression directly in the output column--I recreated your tMap and still don't receive an error.  

Best I can come up with is that there's a language or locale issue here.  If your system is set to use a French locale, it may be expecting "déc." when parsing "MMM" and rejecting "dec" as invalid.  I don't have experience with non-English locales, unfortunately.

Anonymous
Not applicable
Author

It's working !!!!!!, your are just a master .

After you last post about the locale settings , I change my code and it's working fine .

 

Please see below my code and the output and thank you so much .

 

0683p000009LthH.jpg

 

10,2016/12/01 00:00:00,Dec 1; 2036 23:59:56,N/A,N/A,NO
18,2016/12/01 00:00:00,Dec 1; 2036 23:59:56,N/A,N/A,NO
19,2016/12/01 00:00:00,Dec 1; 2036 23:59:56,N/A,N/A,NO
32,2016/12/01 00:00:00,Dec 1; 2036 23:59:56,N/A,N/A,NO
41,2016/12/01 00:00:00,Dec 1; 2036 23:59:56,N/A,N/A,NO
42,2016/12/01 00:00:00,Dec 1; 2036 23:59:56,N/A,N/A,NO
50,2016/12/01 00:00:00,Dec 1; 2036 23:59:56,N/A,N/A,NO
63,2016/12/01 00:00:00,Dec 1; 2036 23:59:56,N/A,N/A,NO
68,2016/12/01 00:00:00,Dec 1; 2036 23:59:56,N/A,N/A,NO
69,2016/12/01 00:00:00,Dec 1; 2036 23:59:56,N/A,N/A,NO
70,2016/12/01 00:00:00,Dec 1; 2036 23:59:56,N/A,N/A,NO
71,2016/12/01 00:00:00,Dec 1; 2036 23:59:56,N/A,N/A,NO
72,2016/12/01 00:00:00,Dec 1; 2036 23:59:56,N/A,N/A,NO
73,2016/12/01 00:00:00,Dec 1; 2036 23:59:56,N/A,N/A,NO
74,2016/12/01 00:00:00,Dec 1; 2036 23:59:56,N/A,N/A,NO
75,2016/12/01 00:00:00,Dec 1; 2036 23:59:56,N/A,N/A,NO