how to get date in string format

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


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

All 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
Seven 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
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.