cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mj2
Frequent Visitor

convertToUtc() not working (throws error)

Simple flow of only one element Compose where I have this:

 

Untitled1.png

 

and response is:

Capture1.PNG

 

No matter what I enter in convertToUtc it throws this error. 

I tried entering date/time manually as well, but error is the same. f.i.

convertToUtc('2019-10-10T00:00:00Z','FLE StandardTime')

 

convertTimeZone(utcNow(),'FLE Standard Time','UTC') does not throw error, but does not convert anything either.

convertFromUtc works as expected.

 

Can someone suggest how to convert from local time to UTC ? I want to pass UTC time to SharePoint.

1 ACCEPTED SOLUTION

Accepted Solutions
RobElliott
Super User
Super User

Hi @mj2, why don't you try the Convert time zone action as in the image below.

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

convertTimeZone2.jpg

View solution in original post

3 REPLIES 3
RobElliott
Super User
Super User

Hi @mj2, why don't you try the Convert time zone action as in the image below.

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

convertTimeZone2.jpg

mj2
Frequent Visitor

Thanks for suggestion @RO . I did not know this component existed.

Anyway, this did not convert anything. 

 

Maybe I'm doing something wrong ?

Take a look to input ant output

Capture2.PNG

 

Here is how I configured it:

Capture1.PNG

 

UPDATE:

I changed input to '2019-10-19T00:00:00' and it worked. Basically removed 'Z' from input. 

 

Thanks

 

 

Pstork1
Dual Super User
Dual Super User

Make sure you remove the Z from the end of your timestamp that Z indicates that the timespan is already in UTC timezone.  That's why it won't convert to UTC.  Its already in UTC but you are trying to convert it from a specific timezone.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,237)