[resolved] How can I convert date to string with TalendDate.getCurrentDate() ?

One Star

[resolved] How can I convert date to string with TalendDate.getCurrentDate() ?

Hello everybody,
I want to convert a date-format to a string without periods in my tmap-Component and I don`t know, if I use it right and how I can get the desired result:
I want to create an output-table which contains the actual date but without periods and without any separators at all, like this: ddMMyy
Is it possible, to write it directly into my output-table?
I think, I can do this job with the expression "TalendDate.getCurrentDate()", right?
Can somebody help me how to use it correctly? What do I have to write into the expression editor to make it work?
In the following screenshot I wrote the function "TalendDate.getCurrentDate()" into the table-cell, where I want to get the result:

(FYI: I`m a beginner in talend with nearly no Java-experience.)

Best regards
Bexy Smiley Happy

Accepted Solutions
Seventeen Stars

Re: [resolved] How can I convert date to string with TalendDate.getCurrentDate() ?

You can use TalendDate.getDate("ddMMyy") instead of TalendDate.getCurrentDate().

All Replies
Seventeen Stars

Re: [resolved] How can I convert date to string with TalendDate.getCurrentDate() ?

You can use TalendDate.getDate("ddMMyy") instead of TalendDate.getCurrentDate().
One Star

Re: [resolved] How can I convert date to string with TalendDate.getCurrentDate() ?

Thank you, jlolling.
 I will test how it works.

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads