datetime_expression: campo ou expressão de "Data" ou "Data e hora".
integer: campo numérico ou expressão inteira que representa o número de partes a serem adicionadas.
part: unidade de medida de tempo a ser adicionada. DATETIME_ADD aceita os seguintes valores de part:
MICROSECOND: disponível para campos ou expressões de "Data e hora".
MILLISECOND: disponível para campos ou expressões de "Data e hora".
SECOND: disponível para campos ou expressões de "Data e hora".
MINUTE: disponível para campos ou expressões de "Data e hora".
HOUR: disponível para campos ou expressões de "Data e hora".
DAY
WEEK: esta parte da data começa no domingo.
ISOWEEK: usa limites da semana ISO 8601. As semanas ISO começam na segunda-feira.
MONTH
QUARTER
YEAR
ISOYEAR: usa o limite de ano com base na numeração da semana ISO 8601. O limite do ano ISO é a segunda-feira da primeira semana que contém a quinta-feira pertencente ao ano do calendário gregoriano correspondente.
Essa função não está disponível para os tipos de data do modo de compatibilidade.
Ao usar as partes MONTH, QUARTER ou YEAR, se a data resultante for o último dia do mês (ou estiver perto dele), DATETIME_ADD vai retornar o último dia do mês. Isso pode acontecer quando o mês na data resultante tem menos dias do que o mês na data inicial.
Por exemplo, se Data = 31 de agosto de 2020, DATETIME_ADD(Date, INTERVAL 1 MONTH) retorna 30 de setembro de 2020.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-07-31 UTC."],[],[],null,["DATETIME_ADD\n============\n\nAdds a specified time interval to a date or a date and time.\n\nSample usage\n------------\n\n`DATETIME_ADD(Order Date, INTERVAL 1 WEEK)`\n\nSyntax\n------\n\n`DATETIME_ADD( `\u003cvar translate=\"no\"\u003edatetime_expression\u003c/var\u003e`, INTERVAL `\u003cvar translate=\"no\"\u003einteger\u003c/var\u003e` `\u003cvar translate=\"no\"\u003epart\u003c/var\u003e` )`\n\n### Parameters\n\n- \u003cvar translate=\"no\"\u003edatetime_expression\u003c/var\u003e - a Date or a Date \\& Time field or expression.\n- \u003cvar translate=\"no\"\u003einteger\u003c/var\u003e - a whole numeric field or expression representing the number of parts to add.\n- \u003cvar translate=\"no\"\u003epart\u003c/var\u003e - the unit of time measurement to add. DATETIME_ADD supports the following values for `part`:\n - `MICROSECOND`: available for Date \\& Time fields or expressions.\n - `MILLISECOND`: available for Date \\& Time fields or expressions.\n - `SECOND`: available for Date \\& Time fields or expressions.\n - `MINUTE`: available for Date \\& Time fields or expressions.\n - `HOUR`: available for Date \\& Time fields or expressions.\n - `DAY`\n - `WEEK`: This date part begins on Sunday.\n - `ISOWEEK`: Uses [ISO 8601 week](https://en.wikipedia.org/wiki/ISO_week_date) boundaries. ISO weeks begin on Monday.\n - `MONTH`\n - `QUARTER`\n - `YEAR`\n - `ISOYEAR`: Uses the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) week-numbering year boundary. The ISO year boundary is the Monday of the first week whose Thursday belongs to the corresponding Gregorian calendar year.\n\nReturn data type\n----------------\n\nDate \\& Time\n\nExamples\n--------\n\nNotes\n-----\n\nThis function is not available for compatibility mode date types.\n\nWhen using `MONTH`, `QUARTER`, or `YEAR` parts, if the resulting date is at (or near) the last day of the month, `DATETIME_ADD` returns the last day of the month. This can happen when the month in the resulting date has fewer days than the month in the starting date.\n\nFor example, if **Date** = August 31, 2020, `DATETIME_ADD(Date, INTERVAL 1 MONTH)` returns September 30, 2020.\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)"]]