Power Automate: sub Function
Subtracts two numbers. Has a 19-digit precision limit that silently corrupts large results.
Power Automate expressions are where a lot of the real magic happens, and this is my reference for the functions that power them. When the point-and-click designer runs out of road, a well-placed expression gets you exactly what you need. I document the everyday date and time helpers like the "addDays" function, the "addHours" function, and the "addMinutes" function, along with the more flexible "addToTime" function for shifting timestamps. I cover math with the "add" function, logic with the "and" function, and data shaping with the "addProperty" function and the "array" function. Need to convert data types? The "base64ToBinary" function gets its own walkthrough, and the "action" and "actions" functions let you reach into earlier steps. Every entry gives you the syntax, the parameters, the return value, a practical example, and the edge cases that catch people out.
Subtracts two numbers. Has a 19-digit precision limit that silently corrupts large results.
Returns the size of a string or the number of elements in an array.
Returns the position of text within a string. Zero-based; -1 when not found.
Extracts part of a string using a start index and length. Zero-based; errors if the range overflows.
Replaces every instance of a substring within a string. Case-sensitive; strings only.
Converts an array into a delimited string. The delimiter goes between items, never at the ends.
Converts a string to an integer. Floats error; 19+ digit numbers silently corrupt.
Breaks a string into an array using a delimiter.
Converts a string to lowercase.
Converts a string to uppercase.
Returns the lowest number in an array. Works with integers and floats.
Adds seconds, minutes, hours, or days to a date in one call.