cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
beniwal
Level: Powered On

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
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!

 

beniwal
Level: Powered On

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
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,178)