I have a timetabling app in which I filter the data by a weekly date picker.
For every member of staff the app is pulling the correct date and time from the SharePoint List where I have used a Date&Time column.
But, there are a few staff members who are seeing the correct events and dates, however the time displayed has an hour difference.
Apart from all the checks, the events being pulled have an hour time difference and this is only happening for 1 or 2 people.
Any suggestions would be greatly appreciated.
Hi @Mo_Islam ,
Are you updating your selected date and time to SharePoint list Date&Time field and in which some of the staff views a wrong result from what you selected?
I see what you have done for checking, but sometimes it is a little difficult to locate where the issue comes from especially with a large quantity of users and equipments, so I suggest you to:
1. Modify the date and time value with the format of UTC. This would help to always display the proper selected time in SP list.
Apply below formula on the Update of the date and time data card, assuming using 12 hours:
DateAdd(DateValue1.SelectedDate + Time(If(AMPMValue1.Selected.Value = "PM", 12, 0) + Mod(Value(HourValue1.Selected.Value), 12), Value(MinuteValue1.Selected.Value), 0), TimeZoneOffset() , Minutes)
2. Modify SharePoint list Date&Time column to a Single Line Text column type. This makes SP list field display the time in text format, and SP would not convert the value while it will do with a DateTimeValue.
i. Modify the field type to Text
ii. Modify the Update property of date and time Data Card to:
Text(DateValue1.SelectedDate + Time(If(AMPMValue1.Selected.Value = "PM", 12, 0) + Mod(Value(HourValue1.Selected.Value), 12), Value(MinuteValue1.Selected.Value), 0))
You could also try to confirm that is there any add-ons for changing time zone installed in the web browsers of those two staffs.
Thank you @v-jefferni
How can I use the 24 hour format instead?
I am using a manual form using patch and ForAll. The date and time line is as follows:
'Start Time': EditStartDatePicker_New_1.SelectedDate + Time(Value(ddEditStartHour_New_1.Selected.Value), Value(ddEditStartMinutes_New_1.Selected.Value),0), 'End Time': EditStartDatePicker_New_1.SelectedDate + Time(Value(ddEditEndHour_New_1.Selected.Value), Value(ddEditEndMinutes_New_1.Selected.Value),0),
How can I apply your suggestion?
And if I change the Date/Time column to text, will this affect the existing data?
Hi @Mo_Islam ,
Please replace below formulas with yours:
'Start Time': DateAdd(EditStartDatePicker_New_1.SelectedDate + Time(Value(ddEditStartHour_New_1.Selected.Value), Value(ddEditStartMinutes_New_1.Selected.Value),0)) 'End Time': DateAdd(EditStartDatePicker_New_1.SelectedDate + Time(Value(ddEditEndHour_New_1.Selected.Value), Value(ddEditEndMinutes_New_1.Selected.Value),0))
For your question, if changing the Date/Time column to text, existing data would be affected and cleared.
Thank you for replying.
What I did is re-create my database, but this time am storing the Date & Time in this format under the Column name EventStart dd/mm/yyyy hh:mm
It seems to work fine for most people, but some machines convert the date in to the US format which means the schedule for a user is not filtered correctly.
Is there a way to make the powerapp use a particular DateTime Format?
I'll give you an example to make it clearer:
To show the above correctly,
THIS WORKS ONLY FOR SOME:
Sort(Filter(colMA_MyTimetable, Text(DateTimeValue(EventStart),"[$-en-GB]dd-mmm") = val_Mon_W.Text),EventStart,Ascending)
I had to change it as this to ensure it works for everyone:
On some machines, the Date format is mm/dd/yyyy which is causing this issue.
Any ideas will be grateful.
Check out the on demand sessions that are available now!
ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.
Features releasing from October 2020 through March 2021
Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!