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.

last_week

Returns a range of the most recent full week starting from Sunday or some other day you specify. Can only be used as a range parameter in for_date_range().

The time range selected for a report does not affect this function. That is, no matter what time range is selected for a report, this function always returns the most recent full week based on today's date.

Syntax

last_week([startDay])

Parameter

  • startDay: Optional. An integer (1 through 7) that specifies which day you consider to be the first day of the week:
    • 1 = Sunday
    • 2 = Monday 
    • 3 = Tuesday
    • 4 = Wednesday
    • 5 = Thursday
    • 6 = Friday
    • 7 = Saturday

By default, Sunday is the starting day.

Examples

  • Clicks.for_date_range(last_week()): Returns the number of clicks from the most recent Sunday to Saturday range.
    last_week() selects the most recent Sunday to Saturday range
  • Clicks.for_date_range(last_week(2)): Returns the number of clicks from the most recent Monday to Sunday range.
    last_week(2) selects the most recent Monday to Sunday range

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
5004134400058901510
true
Search Help Center
true
true
true
true
true
263
false
false