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

Time difference between microsoft Gateway and Powerapps

Dear,

 

I am trying to solve an issue regarding a timing difference between On Premise Gateway connection and my App. 

My app triggers an stored procedure and i want to display the execution information(time of execution and result) in the app. 

 

The app sends an email to the users when it finishes and displays the same information in the app. But there is a timing difference between the displayed time in the email and the app. It is always 2 hours and i believe that it is a timezone issue perhaps but i am struggeling how to change this date in the datatable in my app.

 

Does anyone have an idea to fix this?

 

thank you in advance

 

 

4 REPLIES 4
Highlighted
Super User
Super User

Re: Time difference between microsoft Gateway and Powerapps

@Rensvd 

You will want to look at the TimeZoneOffset function.

Your database will be storing the date as a UTC date, so you will want to convert to and from UTC at all times to get accurate times.

Take a look at the above mentioned document and you will see toward the end of it the formulas for converting to and from UTC.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Anonymous
Not applicable

Re: Time difference between microsoft Gateway and Powerapps

Thanks for posting in the community @Rensvd - can you review the above reply and advise if it was helpful?

 

@Anonymous 

Highlighted
Frequent Visitor

Re: Time difference between microsoft Gateway and Powerapps

HI @RandyHayes ,

 

Before i posted this message i already looked into this formula but i can't get it to work in a Datatable.  In this datatable i display the latest run of a SQL Job.

 

I did some test put in the query within a label then it works but can't get it to work in a datatable.

 

Do you have any idea's?

 

Best regards,

Highlighted
Super User
Super User

Re: Time difference between microsoft Gateway and Powerapps

@Rensvd 

So the issue is with the datatable control.  It is very inflexible as to any formatting or data manipulation.  Therefore, what you need to do is "pre-shape" your data for the datatable.

The easist way to do this is with the AddColumn function.

In this case, you can alter your formula for the Items property similar to this:

AddColumns(yourOriginalItemsProperty, "myConvertedDate", theDateConversionFunction)

Substitute your current Items property formula in the "yourOriginalItemsProperty".

Name the "myConvertedDate" whatever you want (except an already existing column name).

Put the formula you need to convert your date into "theDateConversionFunction".

Then...add the "myConvertedDate" column (or whatever you call it) to your DataTable fields list.

This will give you the formatted and converted value in your table.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

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 (7,596)