Hi everyone.
I've the csv file in which one column has date (which is defined as Number in csv file) but in
tFileInpuDelimited it read as string in which some of the vales are like
20140424 and some are like
2014-04-25 in the same column.I've to parse this data into output component(
tOracleOutput)as date column.So I tried to convert the string to date by using
TalendDate.parseDate("yyyy-MM-dd",TalendDate.formatDate("yyyy-MM-dd",row1.column1)) and changed the output column as date with format
yyyy-MM-dd. Then I'm getting error as
Unparseable date:
"20140424".
How could I parse this into output component?
Any help would be greatly appreciated.
Thank you in advance.
Hi Sabrina,
Please guide on following situation,
i have columns TRISTARTDATE & TRIENDDATE with unix timestamp values with integer data type & i just want to convert them into a proper date format "MM/DD/YYYY" with date as data type.. i am trying following logic for the same but it giving wrong dates...
Proper dates are mentioned below.
TRISTARTDATE (source) TRISTARTDATE(Expected Target)
1425148200 03/01/2015
1423074600 02/05/2015
Waiting for your reply
Regrds,
Shri_Kul1
Talend User
Hi Shri_Kul1, Do you want to parse Integer/int to Date? If so, you can first read integer as a String : (String.valueOf(1425148200)) then analyse the format of the string as a date TalendDate.parseDate("yyyyMMdd",(String.valueOf(1425148200))).
Hi Sabrina ,
I have applied logic which you described earlier, but seems to be not working properly.
please see the below image for your reference. It giving some error like - Unparseable date: "1425148200"
Error message.
Hi,
Actually, your input is "Long" data type. I see you have *1000 in it. Converting long type to Date type on tMap
should be new java.util.Date(long number)
Please see my screenshot.
Best regards
Sabrina
Hi Umesh,
Could you help me out for the issues am facing from yesterday.
Please guide on following situation,
i have columns TRISTARTDATE & TRIENDDATE with unix timestamp values with integer data type & i just want to convert them into a proper date format "MM/DD/YYYY" with date as data type.. i am trying following logic for the same but it giving wrong dates...
Proper dates are mentioned below.
TRISTARTDATE (source) TRISTARTDATE(Expected Target)
1425148200 03/01/2015 1423074600 02/05/2015
Waiting for your reply
Regrds, Shri_Kul1 Talend User
Hi Sabrina / Umesh,
Thanks for your reply , but i am facing same issues , its not giving expected target dates
I have applied the logic you mentioned in your post .
Please see the below image for your reference , you will see the outcome that am getting by this logic.
I don't understand that why these values are converted into only
1970's dates????