Power Automate (WDL) function
ticks — Power Automate (WDL) function reference
Timestamp as a tick count.
Syntax
wdl
ticks(timestamp)
Examples
wdl
ticks(utcNow())
→ A big integer
wdl
div(sub(ticks(outputs('End_time')), ticks(triggerBody()?['StartTime'])), 36000000000)→ Elapsed hours between two timestamps
wdl
greater(sub(ticks(utcNow()), ticks(item()?['LastRun'])), 864000000000)
→ true when more than 1 day has passed since LastRun
Common mistakes & gotchas
- Subtract two ticks values, then divide, to get elapsed time.
- A tick is 100 nanoseconds, not milliseconds or seconds — 10,000,000 ticks per second is the constant to divide by; using the wrong constant is the most common mistake when computing elapsed time.
- ticks() returns a very large integer — keep the math inside WDL rather than exporting the raw value to a downstream system with weaker integer precision.
Related Workflow Definition Language functions
From Date & time