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

Different data in application and database?

Hello,

My "Table1" is a spreadsheet which is stored over OneDrive. I am also using Data Connection of OneDrive, so normally the data in the app should be the same as in the table. Somehow, the dates aren't the same, for example in the app I have 3 cases:

 

04.04.2021John Doe
01.03.2021Kabir Softic
01.03.2021Kabir Softic

 

These dates look different in my spreadsheet:

 

SofticKabir_0-1620748606261.png

 

Why are there different dates in the spreadsheet?

1 ACCEPTED SOLUTION

Accepted Solutions
v-albai-msft
Community Support
Community Support

Hi @SofticKabir ,

This is because your datasource and your app use different Time Zone.

You can manually offset the time. For example, assuming that:

1. You display Excel data inside a gallery. So the default formula for date filed is:

ThisItem.Datum

2. The time difference between your Excel and your app is 10 hours.

 

As a result, you can try this formula for the date field inside your galley:

DateAdd(ThisItem.Datum,10,Hours)

Or:

DateAdd(ThisItem.Datum,-10,Hours)

Note: Number 10 in above code is just an example, it means the difference hours. Remember to replace this number depending on your requirements. Also note the 

Best regards,

Allen

View solution in original post

2 REPLIES 2
v-albai-msft
Community Support
Community Support

Hi @SofticKabir ,

This is because your datasource and your app use different Time Zone.

You can manually offset the time. For example, assuming that:

1. You display Excel data inside a gallery. So the default formula for date filed is:

ThisItem.Datum

2. The time difference between your Excel and your app is 10 hours.

 

As a result, you can try this formula for the date field inside your galley:

DateAdd(ThisItem.Datum,10,Hours)

Or:

DateAdd(ThisItem.Datum,-10,Hours)

Note: Number 10 in above code is just an example, it means the difference hours. Remember to replace this number depending on your requirements. Also note the 

Best regards,

Allen

View solution in original post

Hello @v-albai-msft ,

thank you for the reply/hint.

I tried to apply the DateAdd() function for the Update property, and it kind of works.

For example when I choose the date "09/04/2021" and click on Submit, the date in Excel will be stored as such, but the problem is, with that, the date inside the app is always 1 day ahead, so "10/04/2021".

The solution was to just apply the same function for the app as well. Everywhere, where it would display the date +1 day, I would adjust it.

Thanks!

Best regards,

Softic Kabir

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (47,452)