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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

TalendDate parseDate not woking

Hi,
below,
TalendDate.parseDate("dd-MMM-yyyy", "01-May-2016") ---- its working
TalendDate.parseDate("dd-MMM-yyyy", row1.REVISED_PLAN_DATE) ---Its not woking
but i passes row1.REVISED_PLAN_DAT = "02-May-2011"

Labels (2)
6 Replies
Anonymous
Not applicable
Author

You need to explain what "not working" means.
The most likely outcome is that row1.REVISED_PLAN_DATE does not have the value you expect.
Anonymous
Not applicable
Author

In expression builder i want to use the below code.
I declared REVISED_PLAN_DATE as string and assigned the value is  "02-May-2011"
TalendDate.formatDate("MM/dd/yyyy",TalendDate.parseDate("dd-MMM-yyyy",row1.REVISED_PLAN_DATE))

but its shows an below error,
Exception in component tMap_1
java.lang.RuntimeException: java.text.ParseException: Unparseable date: ""
Anonymous
Not applicable
Author

It isn't really clear what you're trying to achieve.
You're converting a String to a Data and then back to a String; but in a different format?
I'd still say that REVISED_PLAN_DATE is not set to the value that you're expecting.
Anonymous
Not applicable
Author

Let me explain in detail...
I have an input file (common separated) which has two rows and two columns "Name" & "DOB"
The values in 1st row is   John, 02/May/1950
The values in 2nd row is Alex, 11/Jan/1978
Now, I have to push the input file to another text file (just push as is from the input file except the DOB field needs to be changed to Date column type)

Source (Name as string, DOB as string) and Destination (Name as string, DOB as date)
Have attached the file for your reference. 
Thanks in advance!
Anonymous
Not applicable
Author

Hi,
Let me explain in detail...
I have an input file 
The values in 1st row is   John, 02/May/1950
The values in 2nd row is Alex, 11/Jan/1978
And i have one "tFileInputDelimited, tMap and tFileOutputDelimited".

In tMap, i want to change the date format "TalendDate.parseDate("MM-dd-yyyy", row1.DOB) ", but it shows error to convert this line.
Thanks,
Ananth
Anonymous
Not applicable
Author

it still sounds like you string is not what you think it is. try inserting a tLogRow, so you see the data flowing through.