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.
Highlighted
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é

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

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