Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
QUARTER
Gibt das Quartal eines bestimmten Datums zurück.
Verwendungsbeispiel
QUARTER(Date)
Syntax
1) Gibt das Quartal eines Werts vom Typ „Datum“ zurück.
QUARTER( date_expression )
2) Gibt das Quartal eines Werts vom Typ „Datum“ im Kompatibilitätsmodus zurück.
QUARTER( X [, format_string ])
Parameter
date_expression: Ein Feld oder Ausdruck vom Typ „Datum und Uhrzeit“.
X: Ein Feld oder Ausdruck, das bzw. der als Text, Zahl oder Datum im Kompatibilitätsmodus ausgewertet wird.
format_string – Format für X. Optional, wenn X korrekt als semantisches Feld vom Typ „Datum“ konfiguriert ist.
Eingabeformat für Daten im Kompatibilitätsmodus
Die unterstützten Datumsfunktionen akzeptieren die folgenden Eingabeformate, wenn X ein Feld oder Ausdruck vom Typ „Text“ ist oder wenn sie im Kompatibilitätsmodus eingegeben werden:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-03 (UTC)."],[],[],null,["QUARTER\n=======\n\nReturns the quarter of the year for a given date.\n\nSample usage\n------------\n\n`QUARTER(Date)`\n\nSyntax\n------\n\n1) Returns the quarter from a Date value.\n\n`QUARTER( `\u003cvar translate=\"no\"\u003edate_expression\u003c/var\u003e` )`\n\n2) Returns the quarter from a compatibility mode Date value.\n\n`QUARTER( `\u003cvar translate=\"no\"\u003eX\u003c/var\u003e` [, `\u003cvar translate=\"no\"\u003eformat_string\u003c/var\u003e` ])`\n\n### Parameters\n\n- \u003cvar translate=\"no\"\u003edate_expression\u003c/var\u003e - a Date \\& Time field or expression.\n- \u003cvar translate=\"no\"\u003eX\u003c/var\u003e - a field or expression that evaluates to Text, Number, or compatibility mode Date.\n- \u003cvar translate=\"no\"\u003eformat_string\u003c/var\u003e - format for \u003cvar translate=\"no\"\u003eX\u003c/var\u003e. Optional if \u003cvar translate=\"no\"\u003eX\u003c/var\u003e is correctly configured as a semantic date field.\n\n### Input format for compatibility mode dates\n\nSupported date functions accept the following input formats if `X` is a Text field or expression, or compatibility mode Date:\n\n- Any valid [strptime](http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html) format is accepted.\n- `'BASIC':` %Y/%m/%d-%H:%M:%S\n- `'DEFAULT_DASH':` %Y-%m-%d \\[%H:%M:%S\\]\n- `'DEFAULT_SLASH':` %Y/%m/%d \\[%H:%M:%S\\]\n- `'DEFAULT_DECIMAL':` %Y%m%d \\[%H:%M:%S\\]\n- `'RFC_1123':` for example, Sat, 24 May 2008 20:09:47 GMT\n- `'RFC_3339':` for example, 2008-05-24T20:09:47Z\n- `'DECIMAL_DATE':` same as `'DEFAULT_DECIMAL'`\n\nSupported time functions accept the following input format if `X` is a Number field or expression:\n\n- `'SECONDS':` seconds since Epoch\n- `'MILLIS':` milliseconds since Epoch\n- `'MICROS':` microseconds since Epoch\n- `'NANOS':` nanoseconds since Epoch\n- `'JULIAN_DATE':` days since Epoch\n\nExamples\n--------\n\nNotes\n-----\n\nThis function works with both compatibility mode dates and [upgraded Date and Date \\& Time](/looker/docs/studio/dates-and-times) data types.\n\nRelated resources\n-----------------\n\n- [Dates and times](/looker/docs/studio/dates-and-times)\n- [Calculated fields](/looker/docs/studio/about-calculated-fields)\n- [Looker Studio function list](/looker/docs/studio/function-list)"]]