ช่วงวันที่
ภาษาการค้นหาของ Merchant Center ช่วยให้คุณระบุช่วงวันที่โดยใช้
หรือช่วงวันที่สัมพัทธ์ คำขอเมตริกทั้งหมดต้องมีเงื่อนไขสำหรับ
segments.date
ในWHERE
วรรคเพื่อระบุระยะเวลาตั้งแต่
ที่คุณต้องการดึงข้อมูลประสิทธิภาพ
กำหนดช่วงวันที่เอง
คุณสามารถระบุวันที่ในรูปแบบ ISO 8601(YYYY-MM-DD) ดังนี้
segments.date BETWEEN '2021-01-01' AND '2021-01-31'
หรือทำดังนี้
segments.date >= '2021-01-01' AND segments.date <= '2021-01-31'
คุณกำหนดสตริงวันที่ได้ด้วยเครื่องหมายคำพูดเดี่ยว ('
) หรือเครื่องหมายคำพูดคู่
("
) อย่างไรก็ตาม คุณจะต้องสอดคล้องกัน ตัวอย่างเช่น "2021-01-01'
ไม่ใช่
สตริงวันที่ที่ถูกต้อง
ช่วงวันที่สัมพัทธ์
นอกจากช่วงวันที่ที่กำหนดเองแล้ว คุณสามารถระบุช่วงวันที่ที่เกี่ยวข้องเช่น
เป็น LAST_30_DAYS
หรือ THIS_MONTH
โดยใช้ DURING
แทน BETWEEN
และ
AND
:
WHERE segments.date DURING LAST_30_DAYS
โปรดดู
ไวยากรณ์สำหรับภาษาในการค้นหาของ Merchant Center
สำหรับรายการช่วงวันที่ที่เกี่ยวข้องที่มีอยู่
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-09-09 UTC
[null,null,["อัปเดตล่าสุด 2024-09-09 UTC"],[[["The Merchant API is the new version of the Content API for Shopping and represents the future of the platform."],["All Merchant Center Query Language requests for metrics require a `segments.date` condition in the `WHERE` clause to specify the desired time period for performance data retrieval."],["Date ranges can be specified using custom ISO 8601 formatted dates or relative date ranges like `LAST_30_DAYS` using `DURING` in the `WHERE` clause."]]],["The beta version of the Merchant API, the new Content API for Shopping, is introduced. All requests for performance metrics require a `segments.date` condition in the `WHERE` clause. Dates can be specified in ISO 8601 format within a custom range using `BETWEEN` or `\u003e=` and `\u003c=`. Alternatively, relative date ranges like `LAST_30_DAYS` can be specified with `DURING`. For a list of available date ranges, the grammar documentation should be consulted.\n"]]