convertFromUtc function(Power Automate Cloud flows)
Converts a date and time in Coordinated Universal Time to a specified time zone.
Power Automate dates and times are often handled in Coordinated Universal Time (UTC), and you want to convert them to another time zone.
Function | Source | Destination |
---|---|---|
convertFromUtc | Coordinated Universal Time (UTC) | Any |
convertTimeZone | Any | Any |
convertToUtc | Any | Coordinated Universal Time (UTC) |
Spec
convertFromUtc('<timestamp>', '<destinationTimeZone>', '<format>')
Argument | Default | Description |
---|---|---|
timestamp | Required field | Specifies the date of the conversion source. This date must be in Coordinated Universal Time(UTC). Specify in the format to be obtained by the current time action or utcNow function (format unspecified). Any format other than "yyyy-MM-ddTHH:mm:ss.fffffffK" will result in an error. |
destinationTimeZone | Required field | Specifies the time zone after conversion. |
format | yyyy-MM-ddTHH:mm:ss.fffffffK | Specifies the format of the result. If not specified, the format is "yyyy-MM-ddTHH:mm:ss.fffffffK" as well as "timestamp". |
How to use
In most cases, it is used in the "value" when initializing or setting variables of type "string".
Click on the "Expression" tab, convertFromUtc, and the function name and () will be set in the expression field.
- The first argument. Date and time before conversion
- The second argument. The time zone after conversion.
- The third argument. Specifies the format of the result.
When using dynamic content or variables, special specifications are required.
Click on the button, and if the display looks like the following, the setting is complete.
You can change the function by clicking this purple icon.
As an example, here is the result of executing convertFromUtc('2022-05-01T14:00:00.0000000Z', 'Central America Standard Time').
Argument 3 is an optional item. This item specifies the format after conversion.
If omitted, the format is the same as timestamp.
This is the same format as the result of the "Current time" action or the utcNow function (format not specified).
For those who want to learn Power Automate Cloud flow effectively
The information on this site is now available in an easy-to-read e-book format.
Or Kindle Unlimited (unlimited reading).
You willl discover how to about basic operations.
By the end of this book, you will be equipped with the knowledge you need to use Power Automate Cloud flow to streamline your workflow.
Discussion
New Comments
No comments yet. Be the first one!