[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-31 (世界標準時間)。"],[],[],null,["DATE_DIFF\n=========\n\nCalculates the number of days between two compatibility mode dates.\n| **Important:** This function supports only compatibility mode dates. We recommend upgrading any older date fields in your data sources to the new Date or Date \\& Time types and using the [DATETIME_DIFF](/looker/docs/studio/datetimediff) function instead. [Learn more](/looker/docs/studio/dates-and-times).\n\nSample usage\n------------\n\n`DATE_DIFF(End Date, Start Date)`\n\nSyntax\n------\n\n`DATE_DIFF( `\u003cvar translate=\"no\"\u003eX\u003c/var\u003e`, `\u003cvar translate=\"no\"\u003eY\u003c/var\u003e` )`\n\n### Parameters\n\n- \u003cvar translate=\"no\"\u003eX\u003c/var\u003e - a date field or date expression.\n- \u003cvar translate=\"no\"\u003eY\u003c/var\u003e - a date field or date expression.\n\nNotes\n-----\n\n`DATE_DIFF` calculates \u003cvar translate=\"no\"\u003eX\u003c/var\u003e - \u003cvar translate=\"no\"\u003eY\u003c/var\u003e. If \u003cvar translate=\"no\"\u003eX\u003c/var\u003e \\\u003e \u003cvar translate=\"no\"\u003eY\u003c/var\u003e, the result is positive, otherwise the result is negative.\n\nExamples\n--------\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)"]]