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

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!

  • 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 at 2:10
  • Yes, you're welcome :) – Zdeněk Vinduška Jan 31 at 7:06
1

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

  • All my SharePoint regional settings were correct, but yes it was indeed related to the start of Daylight Savings in Australia – DRVR Jan 31 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.