The addMinutes Function works just like the addSeconds Function and other similar functions. It adds the number of minutes to a specific date, based on a particular format.
It follows a simple pattern.
- Number of minutes to add/remove
- (Optional) Date Format
addMinutes('2019-10-28T10:10:00Z', 10,'yyyy-MM-ddTHH:mm:ssZ') will return '2019-10-28T10:20:00Z'
Looks quite straightforward, right? Positive numbers add minutes, and negative excludes them.
Please be aware that the reference material, Microsoft names objects like ‘2019-10-28T10:10:00Z’ as timestamps. I prefer calling them “Date” to avoid confusion with the UNIX timestamp, commonly used in APIs, to represent the number of seconds elapsed since Jan 01 1970 (UTC).
Contrary to SharePoint and Power Apps, there’s no limitation to the date that you can use. You can do things like:
addMinutes('1000-12-30T00:00:00Z',10,'yyyy-MM-ddTHH:mm:ssZ') and you'll get 1000-12-30T00:10:00Z
They behave like you’re expecting.
- Always include the format, even if the value is optional. The default value is “yyyy-MM-ddTHH:mm:ss:fffffffK” but the date provided may not be stored in the same format and will return either wrong times or errors. You can define a single format specifier (for example “o”) or a custom format pattern (for example “yyyy-MM-dd”) so pick your favorite, but be sure to define it.
- There are analogous functions for days, hours, and seconds, so don’t do any math trying to use the addSeconds Function to add minutes, for example.
- Complementary to the addMinutes Function, you can also use the addToTime Function. I recommend using the addMinutes Function because it makes the formula more readable, but the result is the same.
Back to the Power Automate Function Reference.