Examples with TalendDate functions in Java

Examples with TalendDate functions in Java

Get yesterday date in JAVA with Talend

Today date in YYMMDD format : System.out.println(TalendDate.getDate(“YYMMDD”));
Today date in standard java format : System.out.println(TalendDate.getCurrentDate());
Yesterday date in standard java format : System.out.println(TalendDate.addDate(TalendDate.getCurrentDate(),-1,”DD”));
Yesterday date in YYMMDD format  : System.out.println(TalendDate.formatDate(“YYMMdd“, TalendDate.addDate(TalendDate.getCurrentDate(),-1,”DD”)));


Get GMT time

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.