1

this is stumping me - I have a canvas app which connects the a SharePoint Online list. In my list, there is a "Date Only" field, which is displayed on the PowerApps form. The formula for Powerapps is: Text(ThisItem.DateOnlyFieldInQuestion,"dd/mm/yyyy","en-US").

Now, this works perfectly fine for all records... except for any in which the SharePoint date only field is exactly "07/10/2018" (i.e. 7th October 2018). In PowerApps, this displays as "06/10/2018" (6th October 2018, the day before) for some reason.

If I update the formula to include the time (Text(ThisItem.DateOnlyFieldInQuestion,"dd/mm/yyyy hh:mm:ss","en-US"), then the date is displayed as : "06/10/2018 23:00:00". For all other records, the date is correct and the time is 00:00:00, which is what I would have expected for a Date Only field. For example, if I manually enter 6/10/2018, it correctly shows 6/10/2018. If I enter the day after, 8/10/2018, it shows the correct date 8/10/2018.

After further investigation, it seems the issue affects the 1st Sunday of October in any year (e.g. 2nd October 2016, 1st October 2017). Haven't identified any other dates that might trigger it.

I'm a bit stumped, is there something unique about that time and date? Does this sound like a bug? Thanks in advance for any assistance!

1
  • I have noticed this exact issue happen for me today here in Australia on the first Sunday of October, just after Daylight savings change. 04/10/2020 is showing as 03/10/2020 for 'Date only' field in my collection of a Sharepoint list. I might add that the date is correct in the relevant 'Date only' sharepoint point field "04/10/2020" its only when I grab the data and put it in a collection in powerApps, the same 'Date only' in the collection shows as "03/10/2020" instead of "04/10/2020" I even use a filter when collecting the data that filters on the 'Date only' field for anything on "04/10/20 – K M Oct 4 '20 at 6:30
1

yes it looks like some changes with TimeZone or bug, what I recommend to you, look at these functions for DateTime. I did something like this in WF in past, cause it doing exactly the same.

  • I know it is a bit tricky, but DateAdd(4 hours) to the input string, this way all dates will be in the correct day (if there is some time-changing)

    Text( DateAdd( Now(), 4, Hours ), "dd-mm-yyyy hh:mm" )

  • or try to use TimeZoneOffset

    DateAdd( Now(), TimeZoneOffset(), Minutes )

I hope this helps!

2
  • Huzzah, that was it! I'm using Date Only fields, so adding a few hours made sure it was still the right day. – DRVR Jan 31 '19 at 2:10
  • Yes, you're welcome :) – Zdeněk Vinduška Jan 31 '19 at 7:06
1

Sounds like it could be related to Daylight Saving time. Is your SharePoint site set to an Australian timezone?

1
  • All my SharePoint regional settings were correct, but yes it was indeed related to the start of Daylight Savings in Australia – DRVR Jan 31 '19 at 2:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.