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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
vladika
Contributor
Contributor

[resolved] Any way to specify this datetime format from schema editor ??

This is what kind of datetime format I have inside xml file:
12/3/2010 4:02:24 PM
Do I need to import this field as a string and then extract the date, or can I just specify a datetime format inside the schema editor in tFileInputXML ??
From the drop down menu (CTRL+SPACE) in date pattern column of schema editor I don't see the possibility to specify this type of format. The trouble is that days, months and hours can be either one or two numbers (no leading zeros).
Thx.
Labels (3)
1 Solution

Accepted Solutions
alevy
Specialist
Specialist

The drop-down options for date pattern in the schema editor are just common suggestions. You can type any pattern you want built from the different date-part symbols or even use a variable.

View solution in original post

4 Replies
Anonymous
Not applicable

Hi
Specify the datetime format inside the schema in tFileInputXML as:
"dd/MM/yyyy hh:mm:ss aa"
or
Extract it as a string and then convert this string to Date on tMap or other component, for example:
TalendDate.parseDateLocale("dd/MM/yyyy hh:mm:ss aa", yourInputColumn,"en")
Best regards
Shong
alevy
Specialist
Specialist

The drop-down options for date pattern in the schema editor are just common suggestions. You can type any pattern you want built from the different date-part symbols or even use a variable.
vladika
Contributor
Contributor
Author

It works. Thanx guys.
Anonymous
Not applicable

Hi,
I specified the datetime format inside the schema of tFileInputdelimited as:
"MM/dd/yyyy HH:mm:ss aa" so that I can load the data "5/17/2016 12:00:00 AM" into DB2. 
But I couldn't load the exact format. 
I come across "Unparseable date" error and the date loaded into the db is "5/17/2016 12:00:00"
Can you please help to load this date format into DB2. 
Thanks in advance. 0683p000009MACn.png