Six Stars

how to get date in string format

I need to get current date in string format like 06 june 2018. 

i need to pass this value in output excel

1 ACCEPTED SOLUTION

Accepted Solutions
Forteen Stars TRF
Forteen Stars

Re: how to get date in string format

TalendDate.formatDate("dd MMM yyyy",TalendDate.getCurrentDate()) to populate your output field which must be declared as a String.


TRF
2 REPLIES
Forteen Stars TRF
Forteen Stars

Re: how to get date in string format

TalendDate.formatDate("dd MMM yyyy",TalendDate.getCurrentDate()) to populate your output field which must be declared as a String.


TRF
Five Stars

Re: how to get date in string format

 

It should be four times 'M'

because MMM return Jun and MMMM June

TalendDate.formatDate("dd MMMM yyyy",TalendDate.getCurrentDate()) to populate your output field which must be declared as a String.

Regards
Aashish