Here we're adding 8 weeks to the date August 3rd, 2014.
dateAdd( "ww", 8, "8/3/2014" );
Result: {ts '2014-05-03 00:00:00'}
Add Days to a Date (Member Function)
Here we're adding 1 day to the current date/time.
createDate( 2022, 10, 1 ).add( "d", 1 );
Result: {ts '2022-10-02 00:00:00'}
Additional Examples
// the below code increments 10 milliseconds in actual date
dump( dateAdd( "l", 10, now() ) );
// the below code increments 60 seconds in actual date
dump( dateAdd( "s", 60, now() ) );
// the below code increments 60 minutes in actual date
dump( dateAdd( "n", 60, now() ) );
// the below code increments 2 hours in actual date
dump( dateAdd( "h", 2, now() ) );
// the below code increments 1 day in actual date
dump( dateAdd( "d", 1, now() ) );
// the below code increments 1 month in actual date
dump( dateAdd( "m", 1, now() ) );
// the below code increments 1 year in actual date
dump( dateAdd( "yyyy", 1, now() ) );