cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CFVieira
Regular Visitor

Date Value is reading wrong form SQL Server

My applications is reading wrong a date value from SQL Server. This just happening (for now) with the date 02/17/2019, the applications read 02/16/2019 always. The data fiel is type Date.

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @CFVieira,

Could you please share a bit more about the Date type column in your SQL table? Is it a datetime type column?

Based on the issue that you mentioned, I think this issue may be related to Time Zone issue.

When working Date Time values within PowerApps, the date time values would be converted into UTC format automatically in default.

I suppose that you add a datetime column (set your Date column as datetime type) within your SQL table, is it true?

If you add a datetime column (set your Date column as datetime type) within your SQL table, when you read Date values from your SQL table into PowerApps app, the issue would be shown up.

It is a known issue/limit in datetime type column in SQL Server, please check the following blog for more details:

https://powerapps.microsoft.com/en-us/blog/working-with-datetime-values-in-sql/

 

As an alternative solution, please consider take a try to add a datetimeoffset type column in your SQL table to store the Date value instead of datetime type column.

In addition, if you have already used datetime type column to store Date values, and don't want to add other date type column in your SQL table, I think the TimeZoneOffset() function could achieve your needs.

Please consider take a try with the alternative solution mentioned within above blog I mentioned to achieve your needs.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-xida-msft
Community Support
Community Support

Hi @CFVieira,

Could you please share a bit more about the Date type column in your SQL table? Is it a datetime type column?

Based on the issue that you mentioned, I think this issue may be related to Time Zone issue.

When working Date Time values within PowerApps, the date time values would be converted into UTC format automatically in default.

I suppose that you add a datetime column (set your Date column as datetime type) within your SQL table, is it true?

If you add a datetime column (set your Date column as datetime type) within your SQL table, when you read Date values from your SQL table into PowerApps app, the issue would be shown up.

It is a known issue/limit in datetime type column in SQL Server, please check the following blog for more details:

https://powerapps.microsoft.com/en-us/blog/working-with-datetime-values-in-sql/

 

As an alternative solution, please consider take a try to add a datetimeoffset type column in your SQL table to store the Date value instead of datetime type column.

In addition, if you have already used datetime type column to store Date values, and don't want to add other date type column in your SQL table, I think the TimeZoneOffset() function could achieve your needs.

Please consider take a try with the alternative solution mentioned within above blog I mentioned to achieve your needs.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,629)