Tony Developers Community

Tony-Marketing-API.cn is a vibrant community dedicated to Facebook, Meta,Google Ads api, app development, Instagram, and related technologies. It offers valuable bug solutions, troubleshooting cases, and problem-solving strategies shared by users. Stay updated with real-world solutions, development tips, and the latest trends in digital marketing and app development.

Index page Message About

Posts tagged with google-query-language

ROLLING date range in a Google Ads API Query

  • Time: 2022-06-06
  • Category:google-ads-api
  • 10 comments
let startDate = '2020-01-01'; let endDate = new Date().toISOString().slice(0, 10).toString(); // "WHERE segments.date BETWEEN '2020-01-01' AND 'endDate' " 

Returns this error:

Exception: Call to GoogleAdsService.Search failed: Condition 'segments.date BETWEEN '2020-01-01' and 'endDate'' is invalid: BETWEEN operator must have exactly two values that are both numbers or both date strings in 'YYYY-MM-DD' format.

How can I set endDate to YESTERDAY?

Category

  • facebook-graph-api
  • Meta & Facebook
    • WhatsApp Business API
    • Graph API
    • Other
    • Business SDK
    • Instagram Graph API
    • Business Profile
    • Developer Tools
    • App Review
    • Android SDK
    • Platform Policy
    • Marketing API
    • Instagram Platform
    • Social Plugins
    • iOS SDK
    • Payments
    • Instant Games
    • Javascript SDK
    • Facebook Javascript SDK
    • Facebook React Native SDK
    • Facebook iOS SDK
    • Facebook Instant Games
    • Facebook Gameroom
    • Facebook Place Graph
    • Facebook PHP SDK
    • Facebook Game Services
    • Facebook Infrastructure & Reliability
    • Facebook Platform Policy
    • Facebook Android SDK
    • Facebook Business Profile
    • Facebook Social Plugins
    • Facebook Graph API
    • Facebook Marketing API
    • Facebook Business SDK
    • Facebook Payments
    • Facebook Other
    • Facebook Messenger
    • Facebook Developer Tools
    • Facebook Webhooks
    • Facebook WhatsApp Business API
    • Facebook Open Graph
    • Facebook Instagram Platform
    • Facebook App Review
    • Facebook Instagram Graph API
  • Facebook api developers
  • Other Tech information
  • Google
    • google-ads-api
© 2025 Tony Developers Community. Privacy policy