Notification

Welcome to the help center for Search Ads 360, a platform for managing search marketing campaigns.  While the help center is available to the public, access to the Search Ads 360 product is available only to subscribing customers who are signed in. To subscribe or find out more, contact our sales team.

calendar_months

Returns the current month, or counts forward or backwards a specified number of months. Can only be used as the second date parameter in for_date_range(date, date). All counting is relative to the first date parameter in for_date_range(date, date).

Syntax

calendar_months(numberOfMonths)

Parameter

  • numberOfMonths:  A value of zero returns the entire month that the first date parameter is in. A postive integer specifies a number of full  months to count forward. A negative integer specifies a number of full months to count backwards in addition to the current full month.

Examples

  • Clicks.for_date_range(from_date(), calendar_months(0)): Returns the number of clicks for the entire month that from_date() returns.

    In the example below, from_date() returns the 21st, so calendar_months(0) returns the entire month.
    calendar_months(0) returns a full month

  • Clicks.for_date_range(today(), calendar_months(-3)): Returns the number of clicks in the current month plus the previous three full months.

    In the example below, today is the 21st. The function returns the number of clicks from the previous 3 full months, plus the current full month. Since the current month hasn't completed, metrics are returned up to the current day (the 21st).
    calendar_months(-3)

Was this helpful?

How can we improve it?

Need more help?

Try these next steps:

true
Search
Clear search
Close search
Google apps
Main menu
3517182826788112370
true
Search Help Center
true
true
true
true
true
263
false
false