You are here: Functions > GOMONTH()

GOMONTH()

GOMONTH() returns the exact DateTime that is plus or minus the number of months from the specified DateTime.

Function Format

GOMONTH(datetime, number_of_months)

Returns the DateTime that is exactly the number of months forward or backward from the specified DateTime. If the target month does not have sufficient days, such as one month from January 31st, then the returned DateTime is set to the last day of the target month.

Examples

Using a date of August 14, 2013:

GOMONTH(‘20130814‘,4) = ‘20131214‘

GOMONTH(‘20130814‘,-4) = ‘20130414‘