Hi Raj,

You also need to create the statsSelector object.

$selector = new AdGroupSelector();
$selector->statsSelector = new StatsSelector();
$selector->statsSelector->dateRange = new
DateRange('20100101','20100131');

Best,
- Eric Koleda, AdWords API Team

On Mar 17, 1:19 pm, Raj <rajanikant...@gmail.com> wrote:
> Hi team,
>
>   I am trying to get aall AdGroups criterion information for a given
> campaign ID or adGroupID for selected period.
>
> I am getting results but they are alltime results rather than selected
> date range.
>
> I am using the following lines of code for date range.
>
>  $daterange=new DateRange();
>   $daterange->min='2010-01-01';
>   $daterange->max='2010-01-31';
>
> $selector = new AdGroupSelector();
> $selector->statsSelector=$daterange;
>
> $adGroupService = $user->GetAdGroupService('v200909');
> $page = $adGroupService->get($selector);
>
> I tired
> $selector->statsSelector->dateRange=new
> DateRange('2010-01-01','2010-01-31');
> and
> $selector->statsSelector->dateRange=new
> DateRange('20100101','20100131');
>
> then I got error as
> Creating default object from empty value in C:\AppServ\www
> \aw_api_php_lib_1.2.1\examples\v200909\GetAllAdGroups.php on line 61
>
> Please give me guidance.
>
> Thanks,
> Raj

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Have you migrated to v200909 yet?
The v13 sunset is on April 22, 2010.

Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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

Reply via email to