Date Range not working in Budget API

15 views
Skip to first unread message

Sanket Tandalekar

unread,
Jun 25, 2020, 5:28:26 AM6/25/20
to AdWords API and Google Ads API Forum
Hi,

I'm trying to fetch the budget for a particular account using Google Id in JAVA. I want to send a date range which is my start date and end date. I can't find any documentation on how to add date range in Budget API. I have converted into DateTime but still, it returns me all data for that account. I'm using the below code to on Selector to get data. Please help me with this. 

DateTimeFormatter formatter = DateTimeFormat.forPattern("dd/MM/yyyy HH:mm:ss");
DateTime start = formatter.parseDateTime(startdate);
DateTime end = formatter.parseDateTime(endate);
SelectorBuilder selectorBuilder1 =
        new SelectorBuilder().forDateRange(start, end)
            .limit(5)
            .orderDescBy(BudgetOrderField.EndDateTime;. 


Thank You.

Google Ads API Forum Advisor Prod

unread,
Jun 25, 2020, 11:02:50 AM6/25/20
to sanketta...@gmail.com, adwor...@googlegroups.com
Hi Sanket,

Thank you for reaching out. The date range filter is only applicable when you are downloading a report. In your situation, the date range would just be ignored. If you would like to get budget metrics over a certain date range, you can use the Budget Performance Report.

Regards,
Mitchell
Google Ads API Team

ref:_00D1U1174p._5004Q219IGB:ref
Reply all
Reply to author
Forward
0 new messages