Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have comma delimited flat file as my source with row structure as
cust_number |
cust_name |
cust_age |
cust_gender |
cust_height |
cust_registered_date |
001 |
Rado |
25 |
M |
5.4 |
01-jan-2015 |
002 |
John |
65 |
M |
4.9 |
10-nov-2016 |
my requirement is to convert the cust_registered_date into yyyy/mm/dd format and populate a target flat file after few more derivations on the other fields....i am having issues with converting this cust_registered_date to any other format....read through as many posts as possible on the community and below is all i did, but with no success
1) Tried this conversion using TalendDate.parsedate, formatdate
2) Tried putting my input column data type to String, Date, similarly tried changing variable port data type to string, date
3) Tried using the formats yyyy-MMM-dd, yyyy-mmm-dd,yyyy-mon-dd
4) Tried putting single quotes, double quotes, without quotes to the incoming values in the src file
My requirement if put in Sql would be a one liner:
to_date(cust_registered_date,'yyyy-mon-dd')
can any please help
Hello,
What's your input source data type? String or Date?If you need parse String to Date:
The expression should be :TalendDate.parseDate("dd-MM-yyyy",cust_registered_date).
Best regards
Sabrina
Hi fdenis,
Can you elaborate your approach with screen shots please
Thanks Sabrina.
I think the format differences you highlighted in the expression editor and the schema date pattern are not typos but intentional...if Yes, then this is something interesting that i have to check. Will Let you know if that works
Hi,
I need to load data from excel(.xls) to table. In my file date column format is dd/mm/yyyy and I want in same format.
But I am getting result as -
29-12-0020 00:00:00 instead of 29-12-2020 00:00:00
I am using in tmap - TalendDate.parseDate("dd/MM/YYYY",row1.start_date)
I don't want to manually format my column in file as it will be going automated process. Hence in input, I putted type as string.
Could you please help me with this ?
Thanks,