Date + Xdays


I saw in new Java snippet the possibility to work with date,and return field Date...great !!!

but I cannot find a solution to add Xdays (int or double) to a given Date per row....

Thanks in advance

Ok, after long search and try....

if your interested :

Date StartDate; //Date Actuelle
Integer DiffDays; //Jours à additionner
Long LDiffDays; //Jours en Long
Long NewDate;  //Nlle Date

StartDate = c_Validier;
DiffDays= c_MeanSW;

LDiffDays = DiffDays.longValue(); // if not, stay with integer !!!!
NewDate = StartDate.getTime()+(LDiffDays*1000*60*60*24);

out_newDat = new Date(NewDate);

By playing with (1000*60*60*24).....add or sub days, hours, min or sec