MicroStrategy ONE

AddMonths

Returns a date or timestamp plus an offset (+ or -) number of months. In case the new date does not occur in the new month, the last date of the month is returned.

Syntax

AddMonths(Date/Time,Offset)

Where

Date/Time is the input date or timestamp and Offset is an integer number of months to add.

For information on the syntax used in your specific database, refer to the Functions Reference.

Example

AddMonths('2024-07-29', 3) = 2024-10-29

AddMonths('2024-07-29 10:00:00', 3) = 2024-10-29 10:00:00

AddMonths('2023-03-31', -1) = 2023-02-28