Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to convert String(Date in String) to Date.
and the vice - versa.
Also when i am using TalendDate functions/Routines in Tmap - TalendDate.formatDate() for conversion of Date to String... i m not able to get it ....
While the same thing happens if i use TalendDate.parseDate() for conversion of String to Date...
The input date as String is "02/01/1996 05:09:00"
trowgenerator----> tmap------>tlogrow..
Pls help...
Thanks in advance,
Ankit
@ankit7359,still do you have issue? if not please,please mark a solution,so that it will be helpful to others.
@ankit7359,when you convert string to date the below expressions will work that you should specify the correct date format.
stringtodate
TalendDate.parseDate("dd/MM/yyyy HH:mm:ss", row3.newColumn)
date to sting
TalendDate.formatDate("yyyy-MM-dd HH:mm:ss", row3.col)
hi @manodwhb,
Thanks for your response...
What if you have a use - case that String Date should be converted to String Date format...??
I know it quite silly, but can it be possible.. for example.
"02/01/1996" -> "1996/02/01"
Also,on the other post of Tmap understanding issue.....
i was able to get some idea on Inner Join and its reject.. But do you have any other link for Match model and other properties for Tmap...
I wasnt able to get clear understanding on those properties.
Can you pls help me in this regard...
Thanks,
Ankit
convert date to string
TalendDate.formatDate("yyyy-MM-dd",row1.DATE)
convert string to date
TalendDate.parseDate( "yyyy-MM-dd",row1.DATE)
@ankit7359,use the below way.that which will convert the date format.
TalendDate.parseDate("yyyy/MM/dd",TalendDate.formatDate("dd/MM/yyyy",row3.newColumn))
@ankit7359,still do you have issue? if not please,please mark a solution,so that it will be helpful to others.