[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-03。"],[],[],null,["MONTH\n=====\n\nReturns the month of the year for a given date.\n\nSample usage\n------------\n\n`MONTH(Date)`\n\nSyntax\n------\n\n1) Returns the month from a Date value.\n\n`MONTH( `\u003cvar translate=\"no\"\u003edate_expression\u003c/var\u003e` )`\n\n2) Returns the month from a compatibility mode Date value.\n\n`MONTH( `\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#### Format strings 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)"]]