기간
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Search Ads 360 쿼리 언어를 사용하면 다음 두 가지 방법으로 기간을 지정할 수 있습니다.
맞춤 기간
ISO 8601(YYYY-MM-DD
) 형식으로 날짜를 지정할 수 있습니다.
segments.date BETWEEN '2019-01-01' AND '2019-01-31'
segments.date >= '2019-01-01' AND segments.date <= '2019-01-31'
기간
일부 날짜 필드는 사전 정의된 기간을 나타냅니다. 구체적으로는 다음과 같습니다.
segments.week
segments.month
segments.quarter
이러한 세그먼트를 필터링할 때는 기간의 첫날인 날짜와 함께 =
연산자를 사용할 수 있습니다. v9부터 기간의 첫날이 아닌 날짜를 지정하면 MISALIGNED_DATE_FOR_FILTER
오류가 반환됩니다.
예를 들어 2021년 5월을 지정하려면 해당 월의 첫날을 지정하는 다음 조건을 사용합니다.
segments.month = '2021-05-01'
사전 정의된 기간
유효한 사전 정의된 기간 목록은 다음과 같습니다.
기간 |
보고서는 다음을 위해 생성됩니다. |
TODAY |
오늘만 |
YESTERDAY |
어제만 |
LAST_7_DAYS |
오늘을 제외한 지난 7일 |
LAST_BUSINESS_WEEK |
이전 영업주의 5일 영업일(월요일~금요일)입니다. |
THIS_MONTH |
이번 달의 모든 날짜입니다. |
LAST_MONTH |
지난달의 모든 날짜입니다. |
LAST_14_DAYS |
오늘을 제외한 지난 14일 |
LAST_30_DAYS |
오늘을 제외한 지난 30일 |
THIS_WEEK_SUN_TODAY |
이전 일요일부터 현재 날짜까지의 기간입니다. |
THIS_WEEK_MON_TODAY |
이전 월요일부터 현재 날짜까지의 기간입니다. |
LAST_WEEK_SUN_SAT |
이전 일요일부터 시작하는 7일 기간입니다. |
LAST_WEEK_MON_SUN |
이전 월요일부터 시작되는 7일 기간입니다. |
예:
segments.date DURING LAST_30_DAYS
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-29(UTC)
[null,null,["최종 업데이트: 2025-08-29(UTC)"],[[["\u003cp\u003eThe Search Ads 360 Query Language allows specifying date ranges using either custom dates or predefined date ranges.\u003c/p\u003e\n"],["\u003cp\u003eCustom date ranges can be defined using ISO 8601 format and operators like \u003ccode\u003eBETWEEN\u003c/code\u003e, \u003ccode\u003e>=\u003c/code\u003e, and \u003ccode\u003e<=\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eTime period segments such as week, month, and quarter require filtering with the first day of the period using the \u003ccode\u003e=\u003c/code\u003e operator.\u003c/p\u003e\n"],["\u003cp\u003ePredefined date ranges offer shortcuts for common periods like \u003ccode\u003eTODAY\u003c/code\u003e, \u003ccode\u003eLAST_7_DAYS\u003c/code\u003e, \u003ccode\u003eLAST_MONTH\u003c/code\u003e, and others, simplifying query construction.\u003c/p\u003e\n"],["\u003cp\u003eSpecifying a date that is not the first day of a period for segments like \u003ccode\u003esegments.month\u003c/code\u003e will result in a \u003ccode\u003eMISALIGNED_DATE_FOR_FILTER\u003c/code\u003e error.\u003c/p\u003e\n"]]],["The Search Ads 360 Query Language uses custom or predefined date ranges. Custom ranges utilize ISO 8601 format (YYYY-MM-DD) for specific dates (e.g., `segments.date BETWEEN '2019-01-01' AND '2019-01-31'`). For segments like `week`, `month`, or `quarter`, filters must use the first day of the period. Predefined ranges, such as `TODAY`, `LAST_7_DAYS`, or `LAST_MONTH`, offer shortcuts (e.g., `segments.date DURING LAST_30_DAYS`).\n"],null,["# Date Ranges\n\nThe Search Ads 360 Query Language lets you specify the date range in two ways:\n\n- custom date range\n\n- predefined date range\n\nCustom date range\n-----------------\n\nYou can specify dates in ISO 8601(`YYYY-MM-DD`) format: \n\n segments.date BETWEEN '2019-01-01' AND '2019-01-31'\n\n segments.date \u003e= '2019-01-01' AND segments.date \u003c= '2019-01-31'\n\n### Time periods\n\nSome date fields refer to a predefined period of time, specifically:\n\n- `segments.week`\n- `segments.month`\n- `segments.quarter`\n\nWhen filtering on these segments, you can use the `=` operator with the date\nthat is the first day of the time period. Starting in v9, if you specify a date\nthat is not the first day of a period, a `MISALIGNED_DATE_FOR_FILTER` error is\nreturned.\n\nFor example, to specify the month of May in the year 2021, you would use the\nfollowing condition, specifying the first day of that month: \n\n segments.month = '2021-05-01'\n\nPredefined date range\n---------------------\n\nThe list of valid predefined date ranges is as follows:\n\n| Date range | Reports are generated for... |\n|-----------------------|--------------------------------------------------------------------------------|\n| `TODAY` | Today only. |\n| `YESTERDAY` | Yesterday only. |\n| `LAST_7_DAYS` | The last 7 days not including today. |\n| `LAST_BUSINESS_WEEK` | The 5 day business week, Monday through Friday, of the previous business week. |\n| `THIS_MONTH` | All days in the current month. |\n| `LAST_MONTH` | All days in the previous month. |\n| `LAST_14_DAYS` | The last 14 days not including today. |\n| `LAST_30_DAYS` | The last 30 days not including today. |\n| `THIS_WEEK_SUN_TODAY` | The period between the previous Sunday and the current day. |\n| `THIS_WEEK_MON_TODAY` | The period between the previous Monday and the current day. |\n| `LAST_WEEK_SUN_SAT` | The 7-day period starting with the previous Sunday. |\n| `LAST_WEEK_MON_SUN` | The 7-day period starting with the previous Monday. |\n\nExample: \n\n segments.date DURING LAST_30_DAYS"]]