Specifies days to operate on. For example, Clicks.for_date_range(Last_30_days())
returns the number of clicks in the last 30 days.
You can attach this function to any expression in the formula language with precedence just under that of parentheses. In other words, you can add it to the end of any function call, expression in parentheses, column reference (Search Ads 360-provided columns or formula columns), Search Ads 360 variable, or constant value.
Syntax
.for_date_range(date)
.for_date_range(date, date)
.for_date_range(range)
.for_date_range(date, duration)
Parameters
- date
- Use any of the following functions:
- range
- Use any of the following functions:
- duration
- Use any of the following functions:
Examples
If today is October 15, 2013:
-
Clicks.for_date_range(Last_7_days())
returns the number of clicks from October 8 to October 14. -
Clicks.for_date_range(Last_30_days())
returns the number of clicks from September 15 to October 14. -
Cost.for_date_range(Yesterday())
returns the cost on October 14. -
Clicks.for_date_range(Today(), Days(7))
returns the number of clicks between October 15 and 21. -
c:"Al's custom column".for_date_range(Date(2013, 10, 1), Today())
returns the custom column from October 1 to October 15. -
Actions.for_date_range(Date(2013, 11, 1), Date(2013, 11, 30))
returns actions from November 1, 2013, to November 30, 2013. -
to_money(0.1 * c:"Washington Sales" + 0.05 * c:"Illinois Sales").For_date_range(Date(2013, 1, 1), Months(12))
returns the specified calculation from January 1, 2013 to December 31, 2013. -
Clicks.for_date_range(today(), days(-7))
returns the number of clicks between October 8, 12 a.m. and October 14, 11:59 p.m. (days() always starts from the most recent midnight). -
Clicks.for_date_range(today(), days(14))
returns the number of clicks from October 15 to October 28 (days() always starts from the most recent midnight).