Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI,
I am trying to convert a date format from yyyy/mm/dd to MMM-YY. E.g., if the date in the input excel is 2019/01/01 then I want the output as JAN-19 and I have used TalendDate.formatDate("MMM-yy",row28.Start_Date) in the Variable and StringHandling.UPCASE(Var.var1) in the expression .
The input file is excel and the Type is Date "YYYY/mm/DD". For the output format I am changing it to String in variable and string in output excel. I am getting null pointer exceptions about Dateformat so I tried to add row28.Start_Date==null?null:TalendDate.formatDate("MMM-yy",row28.Start_Date) .
It is running without errors but now it is returning only blank for that oarticular column.
any help will be greatly appreciated.. Thanks
SK
Hi,
You were right.. My bad. The input file value was actually blank for the record I was checking. I passed a dummy date and it processed fine. Thank you..
Hi akumar2305,
Thanks for the reply.
I would be using that column to map other columns in the output so I dont think I can change the dateformat because it will affect other column data.
possible it some mistake somewhere, because it work as expected:
[statistics] connecting to socket on port 3784 [statistics] connected .----------. |tLogRow_1 | |=--------=| |Start_Date| |=--------=| |Jan-19 | |null | '----------' [statistics] disconnected
Hi,
You were right.. My bad. The input file value was actually blank for the record I was checking. I passed a dummy date and it processed fine. Thank you..