cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate III
Advocate III

Re: Date displayed is one day off

Here's a very simple way to solve the issue.

 

In this example, DatePickerControl is the name of a Date Picker control.

 

Set(DateSelected, DateAdd( DatePickerControl.SelectedDate, TimeZoneOffset(DatePickerControl.SelectedDate), Minutes ));

Highlighted
Frequent Visitor

Re: Date displayed is one day off

I have a form app that i am having issues with the time displayed, wondering if anyone could help. Basically it has an edit screen with a date selector that populates an excel file in onedrive. The details screen shows the info of the parent.  I have the data set to UTC in the app and the date and time displaying correctly in Excel. I believe it is converting the UTC time to my timezone Eastern in Excel. In the app on the details page, the time is 5 hours off, the UTC time. How can i get the app to show Eastern time. For example, if i create a new record and set the time to 7 am, in excel, it lists it correctly. In the details screen of that record in the app it shows 2AM. 

Highlighted
Frequent Visitor

Re: Date displayed is one day off

Nevermind, I figured it out. In the details data text i replaced Parent.Default with:  DateAdd(ThisItem.StartDate, TimeZoneOffset(ThisItem.StartDate),Minutes)

Highlighted
Anonymous
Not applicable

Re: Date displayed is one day off

Is there a way to remove the 00:00 from this formula??

Highlighted
Advocate IV
Advocate IV

Re: Date displayed is one day off

I just tried this by applying it directly to the card default and saw that I needed to change "Parent.Default" to "ThisItem.[cardname]" and it worked. I believe if you're using this as a default for the card than it needs to ThisItem, if you're using it for a text field inside the card, then it would be Parent.Default...I believe.

Highlighted
Helper III
Helper III

Re: Date displayed is one day off

@mikecopp  

 

I am having the same issue. Can you please share screen shoot ? on which property did you add the formula ?

Highlighted
Frequent Visitor

Re: Date displayed is one day off

Hi,

I am trying to take the date from date picker and my data source is excel file in one drive .But,the problem is , when i edit the record or create a record the date value is stored one day less than the actual give date which is selected from date picker.

Highlighted
Advocate IV
Advocate IV

Re: Date displayed is one day off

Hi @venkat4331 ,

 

Although I haven't tried with excel, I had a similar issue when saving to a SQL database and found that if I created a date only type instead of datetime, and saved a Today() instead of a Now(), as far as I can tell it worked as intended.

 

Maybe a similar type needs to be formatted for that column in Excel?

 

Maybe try testing it with a date column in the CDS?

Highlighted
Regular Visitor

Re: Date displayed is one day off

I have an sharepoint list  with a calculate field that calculates a date. In the  display the date in a text control I have: DateValue(ThisItem.'sharepoint field'), it is ok because it shows me "Month 12 2016", but I have the same problem T when I view the records in a Gallery or otherwise pull the record up later, the date is early by one day.

 

Has anyone encountered any kind of "solution"?

 

Thanks, 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,537)