cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

date time conversion

hi,

 

I need to convert a past EST DateTime to UTC DateTime formate.

 

Is there any way to do it in powerapps?

 

Thanks,

Mohit

2 REPLIES 2
Highlighted
Dual Super User
Dual Super User

Re: date time conversion

Hi @beniwal 

 

To convert the current time zone to UTC, you can try out the below mentioned formula:
 
Text(DateTimeValue(Label2.Text),DateTimeFormat.UTC)
MicrosoftTeams-image (186).png

 

Here Label2 is a label which contains the date time value that needs to be converted. Also, this conversion will be based on current user's time zone.
 
In case you want to convert est to utc without bothering about the current location. You can directly subtract 5 hours from the date by using:
 
Text(DateAdd(DateTimeValue(Label2.Text),-5,Hours))MicrosoftTeams-image (187).png

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

Highlighted
Helper III
Helper III

Re: date time conversion

HI @yashag2255 

 

Thanks for your reply 

 

I am able to see the UTC DateTime in Text but when I am converting it back to the DateTime value to store in sql server. It is getting converted back according to my system's time zone.  

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,346)