Power Automate (WDL) function
startOfDay / startOfMonth — Power Automate (WDL) function reference
Snap to a boundary.
Syntax
wdl
startOfDay(timestamp, ['format']) / startOfMonth(timestamp, ['format'])
Examples
wdl
startOfDay(utcNow())
→ Midnight today
wdl
startOfMonth(utcNow())
→ The first day of the current month at midnight UTC
wdl
equals(startOfDay(item()?['CreatedDate']), startOfDay(utcNow()))
→ true when the item was created "today", ignoring time-of-day
Common mistakes & gotchas
- Both zero out the time portion to midnight UTC — there is no startOfWeek()/startOfYear(); compute those manually (e.g. subtract dayOfWeek() days for a week boundary).
- Because the reset is to midnight UTC specifically, a locally entered "today" near a timezone boundary can appear as "yesterday" or "tomorrow" unless converted to local time first.
Related Workflow Definition Language functions
From Date & time