How to add days in a date

One Star

How to add days in a date

Hi,
I am new to talend and figuring out how to add 10 days to a date coming from the source in Tmap.
Community Manager

Re: How to add days in a date

Hello Sheffy Gupta
what are your really expected result? Can you take an example?
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: How to add days in a date

Hi,
you have to convert your date in a Calender. You can found some more information and examples here:
Java API
Examples
Bye
Volker
One Star

Re: How to add days in a date

Hello,
You can create this routine :

public static java.util.Date add_a_day(java.util.Date ref_date) {

java.util.Calendar cal1 = java.util.Calendar.getInstance();
cal1.setTime(ref_date);
java.util.Date date_out;
cal1.add(java.util.Calendar.DAY_OF_MONTH, 10);
date_out = cal1.getTime();
return date_out ;

}
}

José

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download