Formatting the Current Date - 7.1

Talend Data Management Platform Studio User Guide

author
Talend Documentation Team
EnrichVersion
7.1
EnrichProdName
Talend Data Management Platform
task
Design and Development
EnrichPlatform
Talend Studio

It is easy to use the getDate routine, along with a tJava component, to retrieve and format the current date according to a specified format, for example:

System.out.println(TalendDate.getDate("CCYY-MM-DD"));

The current date is returned in the specified format (optional):