You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Returns a timestamp resultant of adding n months to timestamp t.

Use this function instead of simply adding n * {MONTH}, since {MONTH}is a macro equivalent to 30 * {DAY}. Negative values for n are used in order to subtract instead of adding.

Syntax
addMonths(timestamp, months, timeZone time_zone) #Output: number 
Examples
Parser expressionDescription

addMonths(t, 3, LOCAL)



timestamp t has the value: March, 25th 2011 23:15

This function returns a timestamp as a NUMBER with the value: June, 25th 2011 23:15

In this function we are not taking into consideration the fact that some months have more or less than 30 days.