Showing results for 
Search instead for 
Did you mean: 
Not applicable

Datepicker: Selected Date goes back 2 days when saved in database



I have a datepicker control which I use to select a date.

The format is set to ShortDate, DateTimeZone to UTC.

I retrieve the date using DatePicker.SelectedDate


When i save this retrieved value, it goes back by 2 days in the database.

I am unsure on what is causing this issue, although something tells me that it could be a timezone issue.

Any thoughts on how to overcome this problem?




Super User
Super User


2 days or 2 hours?  If it was 2 hours I'd say you're dealing with a timezone issue.  But, 2 days is something else.

Is the data stored (looking directly at your datasource) actually 2 days back, or just when you view the item again in PowerApps?

Also, what is your datasource?

Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Community Support
Community Support

Hi @Anonymous ,

Could you please share a bit more about the database that you mentioned? Is it a SQL Table?

Do you mean that the Date value stored in your database is two days before the selected date in your DatePicker control? Two days is the time offset rather than 2 hours?


I assume that the database that you mentioned is a SQL Table, and you use a datetime type column in your SQL Table to store the selected Date value, is it true?


Actually, it is an known limit when using datetime type column of SQL Table in PowerApps -- If you use datetime (and friends) in SQL with PowerApps, then you may have the time zone offset issues.

Please check the following blog for more details:


As an fixed solution, you could consider remove the datetime type column from your SQL Table, instead, add a datetimeoffset type column to store the time value. In addition, you need to set the DateTimeZone property of the DatePicker control to following:


rather than UTC.


If you have already used the datetime type column value to store the selected date time value from your app, and do not want to add a new datetimeoffset type column in your SQL Table, please take a try with the following workaround:

1. If you use Patch function to suibmit data into your SQL Table:

Set the OnSelect proeprty of the "Submit" button to following:

Column1: "xxx",
..., DateTime: DateAdd(DatePicker1.SelectedDate, -TimeZoneOffset(myDateTime), Minutes), /* <-- DatePicker1 represents the DatePicker control in your app */
... }

2. If you use Edit form to submit data into your SQL Table:4.JPG

within your Edit form, set the Update property of the Datetime field data card to following:

DateValue1.SelectedDate + Time(Value(HourValue1.Selected.Value), Value(MinuteValue1.Selected.Value), 0),

please consider take a try with above solution, then check if the issue is solved. Also please take a try with the solutions mentioned within above blog I provided.


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.
Not applicable




DateTime: DateAdd(DatePicker1.SelectedDate, -TimeZoneOffset(myDateTime), Minutes),

But this is not working. Just curious, what is myDateTime here? I replaced this with  DatePicker1.SelectedDate but as mentioned not working.


I tried the other work around, added a column NewDate with datetimezoneoffset type, but in this case, the date being saved is one day prior to the one being selected from the datepicker.


Datetimezone is set to Local.

Please advise.






Helpful resources

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 (1,847)