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

Date format conversion

I am getting "dd-mon-yyyy" from my input csv file & want to parse this date & want to punch this value of date into my database in format of "mm-dd-rrrr hh:mi:ss".How to parse this date & convert it.Please help.Thanks in advance.
Labels (2)
1 Reply
alevy
Specialist
Specialist

If the field in the database is a date, it doesn't have a format as such. The format is just how you view it, not how it's stored. So all you need to do is correctly read the value from the input file as a date and pass that to the database. To do that, set the column in the input file schema to a date with a pattern of "dd-MMM-yyyy".
If the field in the database is actually a string rather than a date, you will need to convert the date you read from the file as I explained above. To do that, use an expression in tMap e.g. Talend.formatDate("MM-dd-yyyy hh:mm:ss",row1.myDate).