adding days to a date

Hi,

I’m trying to add a specified number of days to a certain date in Data Integrator.

I know that there’s a add_months function, but is there also a add_days function?

Does anyone know another way to add days to a date?

Thanks,

JT


jtexel (BOB member since 2009-09-10)

sysdate()+1

is tomorrow, same time.


Werner Daehn :de: (BOB member since 2004-12-17)

Since this is the first answer that came up when looking to add days to a date, I thought I would respond to this post. In my case I was needing to go back 5 days from the previous end of the month function so here’s how I resolved it:

$EOM_Date = last_date(add_months(sysdate(), -1));
$gv_EOM_Date_5 = $EOM_Date + num_to_interval(-5,‘D’);

With the num_to_interval function, you can use D for days, H for hours, M for minutes and S for seconds. Hope this helps someone.

Thanks,
Randy


CCRDad (BOB member since 2014-01-27)