Seven Stars

Date format issue

Hi Folks,

 

             How to convert below date format to normal date. Kindly share your information.

  INPUT                                        

Thu Apr 30 00:00:00 UTC 2015 

 

OUTPUT

30-03-2015

2 REPLIES
One Star

Re: Date format issue

Hi,

 

You can simply use the "TalendDate.formatDate("yyyy-MM-dd HH:mm:ss",myDate)" function.

You will get a String and can get a Date with the TalendDate.parseDate() function :

 

TalendDate.parseDate("yyyy-MM-dd HH:mm:ss",TalendDate.formatDate("yyyy-MM-dd HH:mm:ss",row2.MyDate),true)

Seven Stars sgv
Seven Stars

Re: Date format issue

Hi,

Here it's the pattern

EEE MMM dd HH:mm:ss zzz yyyy

 

It's working for you ?

 

SGV