Found the list of current values: 
https://developers.google.com/google-ads/api/docs/query/date-ranges

And the reason that the documentation said that "DURING" was deprecated was 
that it was describing the sunset of the independent clause, but it's been 
replaced with an operator.

So, it's like "during" used to be a sibling to WHERE (like sort order and 
group by in SQL), but now it's part of the WHERE clause itself.  That 
change is documented here:
https://developers.google.com/google-ads/api/docs/migration/querying

Relevant excerpt: "Date filtering is different. There is no longer a DURING 
clause; 
instead, DURING is an operator that can be used in WHERE clauses. Filter 
the field date using the DURING clause for the same functionality as the 
DURING clause in AWQL."


On Monday, March 13, 2023 at 1:37:48 PM UTC-7 Roy Steves wrote:

> Maybe there wasn't at the time, but there sure is now.
>
> There is according to the examples here:  
>
> https://developers.google.com/google-ads/api/docs/query/overview#querying_for_segments
>
> I haven't found the list of acceptable values yet, so maybe that 
> documentation is out of date, but it is for the current version of the API.
>
> This validated, for example:
> SELECT
>   campaign.id,
>   campaign.name,
>   campaign.status,
>   metrics.impressions,
>   segments.date
> FROM campaign
> WHERE campaign.status = 'PAUSED'
>   AND metrics.impressions > 1000
>   AND segments.date during LAST_30_DAYS
> ORDER BY campaign.id
>
> On Tuesday, July 26, 2022 at 2:33:19 PM UTC-7 charlesb...@gmail.com wrote:
>
>> Hi,
>>
>> There's no "DURING" with GAQL.
>>
>> Try the GAQL query validator.
>>
>> On Tuesday, 26 July 2022 at 14:51:03 UTC-5 hema21...@gmail.com wrote:
>>
>>> Hi Team
>>>
>>> I'm trying to get the data based on  the date range. The following query 
>>> is working fine if I'm specifying the predefined date ranges like 
>>> LAST_MONTH, LAST_7_DAYS. But, giving an error while trying to give the 
>>> custom date ranges for "segments.date" . Could you pls let me know what is 
>>> causing the issue and if you can provide the working query for the below 
>>> example with custom date range will really help. TIA!
>>>
>>>
>>> curl -f --request POST "
>>> https://googleads.googleapis.com/v11/customers/3659251597/googleAds:searchStream";
>>>  
>>> --header "login-customer-id:4382929747 <(438)%20292-9747>" --header 
>>> "Content-Type: application/json" --header 'developer-token: ${dev_token}' 
>>> --header 'Authorization: Bearer '${access_token}'' --data '{ "query": 
>>> "select metrics.clicks, segments.device, segments.day_of_week, 
>>> segments.month_of_year FROM campaign WHERE metrics.clicks > 0 AND 
>>> segments.date DURING LAST_MONTH LIMIT 10" }'
>>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/78f03167-7509-4c4e-b585-5aee48c93b58n%40googlegroups.com.
  • Re... Roy Steves
    • ... Roy Steves
      • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to