Date & Time

addToTime

Adds any number of time units (seconds to years) to a timestamp.

Syntax

addToTime('<timestamp>', <interval>, '<timeUnit>', '<format>'?)

Parameters

interval
How many units to add.
timeUnit
Second, Minute, Hour, Day, Week, Month or Year.

Examples

  1. addToTime('2026-01-31T00:00:00Z', 1, 'Month')

    '2026-02-28T00:00:00.0000000Z'

Maker notes

  • Adding a month to the 31st lands on the last day of the next month.
Official documentation on Microsoft Learn

↑ ↓ moveEnter open