We are running a query using AWQL with the FeedItemService but want to filter the results by EndTime.
Previously using the old googleads-php-lib we were able to do it like this
$awql = 'SELECT KeywordText,TargetingAdGroupId,TargetingCampaignId,FeedItemId, FeedId, Status, AttributeValues,
EndTime
WHERE Status IN[ENABLED] AND EndTime > ' . date('Ymd', strtotime(' -1 day'));
We have updated to the new version and now our code is
$query = (new ServiceQueryBuilder())
->select([
'KeywordTargetingText',
'TargetingAdGroupId',
'TargetingCampaignId',
'FeedItemId',
'FeedId',
'Status',
'AttributeValues',
'EndTime'
])
->where('Status')->in(['ENABLED'])
->where('EndTime')->greater_than([date('Ymd', strtotime(' -1 day'))])
->build();
The greater than syntax does not work so how can we perform this same action?