Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/31 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 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)"]]