addmonths - script and chart function

This function returns the date occurring n months after startdate or, if n is negative, the date occurring n months before startdate.

Syntax:  

AddMonths(startdate, n , [ , mode])

Return data type: dual

Arguments:  

Argument Description
startdate The start date as a time stamp, for example '2012-10-12'.
n Number of months as a positive or negative integer.
mode mode specifies if the month is added relative to the beginning of the month or relative to the end of the month. If the input date is the 28th or above and mode is set to 1, the function will return a date which is the same distance from the end of the month as the input date. Default mode is 0.

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?