MinuteOfHour from query

64 views
Skip to first unread message

beyond Clicks

unread,
Oct 5, 2020, 10:52:46 AM10/5/20
to AdWords API and Google Ads API Forum

Ive got the query
SELECT campaign_criterion.ad_schedule.start_hour, campaign_criterion.ad_schedule.start_minute, campaign_criterion.ad_schedule.end_hour, campaign_criterion.ad_schedule.end_minute FROM ad_schedule_view

Two of these values bring back one of These (minuites) and I can only find the docs to SEND this data, not turn it back into usable information, is a response of "2" 0 minuites past the hour?

Any help would be appreciated.

beyond Clicks

unread,
Oct 5, 2020, 11:02:41 AM10/5/20
to AdWords API and Google Ads API Forum
Extra detail; Code below

        $query = "SELECT campaign_criterion.ad_schedule.start_hour, campaign_criterion.ad_schedule.start_minute, campaign_criterion.ad_schedule.end_hour, campaign_criterion.ad_schedule.end_minute FROM ad_schedule_view";
        $stream = $googleAdsServiceClient->searchStream($accountId$query);

        foreach ($stream->iterateAllElements() as $googleAdsRow) {
            $obj = $googleAdsRow->getCampaignCriterion()->getAdSchedule();

            $SMin = $obj->getMinuiteOfHour();
            $SHour = $obj->getStartHour()->getValue();
            $EMin = $obj->getEndMinute();
            $EHour = $obj->getEndHour()->getValue();

            $time = $SHour . ":" . $SMin . " to " . $EHour . ":" . $EMin;

Google Ads API Forum Advisor Prod

unread,
Oct 6, 2020, 1:57:09 AM10/6/20
to byon...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for your email.

The ZERO value should indicate that the record happened between the first seconds and before the first minute. Let me know if this helps and if you have additional clarifications.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q25ZE2x:ref

beyond Clicks

unread,
Oct 6, 2020, 5:11:56 AM10/6/20
to AdWords API and Google Ads API Forum
hi API Advisor,

Unfortunatley that hasn't clarified it much at all...

As a response from the query above, ->getEndMinuite() and ->GetStartMinuite() provide me values between 0 and 5 but nowhere can I find listed what those numbers correlate to.

Google Ads API Forum Advisor Prod

unread,
Oct 6, 2020, 11:27:43 PM10/6/20
to byon...@gmail.com, adwor...@googlegroups.com
Hi,

Could you provide your customer ID and the actual values or the results that your report request is returning? You may send your reply using the Reply privately to author option.
Reply all
Reply to author
Forward
0 new messages