-
Notifications
You must be signed in to change notification settings - Fork 0
Working with Dates and Times
Make better later.
-
SB - Dates and times. This is a sandbox flow for experimenting with date and time functions.
-
To get today's date as a datetime string:
utcNow()
.- This returns the current date and time in Universal Coordinated Time.
- It takes the form
2023-01-25T16:59:31.1313071Z
.
-
To convert the time zone of a datetime string:
convertTimeZone()
- For example, to convert today's date to central time use
convertTimeZone(utcNow(), 'UTC', 'Central Standard Time')
. - It take the form
2023-01-25T10:59:31.1781805
.
- For example, to convert today's date to central time use
-
-
Get date from datetime. Add description.
formatDateTime(variables('dateTimeToday'),'yyy-MM-dd')
-
Identify tasks created 10 days ago.
mod(variables('daysDiffWIP'), 10)
Today's date in ticks: ticks(convertTimeZone(utcNow(), 'UTC', 'Central Standard Time'))
To convert a stored date variable to ticks: ticks(item()?['createdDateTime'])
To convert ticks to days, divide by 864000000000: div(variables('today'), 864000000000)
To find the difference between two dates in ticks: sub(variables('today'),variables('dateCreated'))
To find the difference between two dates in days: div(sub(variables('today'),variables('dateCreated')), 864000000000)
To find out if the number of days is divisible by 7: mod(variables('daysDiffWIP'), 7)
The today()
function returns a datetime string 2023-01-25T10:50:46.0611874
in
- Home
- Power Autmate Project Board (cmd + click)
- Development Project Board (cmd + click)
- Style Guide