[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-31 UTC."],[],[],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)"]]