Power Automate (WDL) function
addToTime — Power Automate (WDL) function reference
Add an arbitrary span.
Syntax
wdl
addToTime(timestamp, interval, timeUnit, ['format'])
Examples
wdl
addToTime(utcNow(), 3, 'Month')
→ A timestamp
wdl
addToTime(triggerBody()?['SubscriptionStart'], 1, 'Year')
→ The subscription start date, one year later
wdl
addToTime(utcNow(), 6, 'Hour', 'yyyy-MM-ddTHH:mm:ssZ')
→ A custom-formatted timestamp 6 hours from now
Common mistakes & gotchas
- timeUnit must be one of 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' — singular and capitalized exactly like that, or the call throws.
- For 'Month'/'Year' units, addToTime() clamps rather than overflows — adding 1 month to Jan 31 lands on Feb 28 (or 29), not Mar 3.
Related Workflow Definition Language functions
From Date & time