cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jdriele
Kudo Collector
Kudo Collector

Calendar event display issue

Hello,

 

I discover a bug in my application with US user. When they use the Calendar default screen, to see Monday event they have to select Tuesday...

 

How can I correct it without telling to my user to have their week starting by Monday ?

 

BR

2 ACCEPTED SOLUTIONS

Accepted Solutions

@Jdriele 

Understood, but, if there is just a date, then it will be whatever date and 12:00 AM by default (in whatever timezone it is in).  If you display that date in a timezone that is 1 hour more, then it is 1 hour less to the date, and thus, the date becomes a day earlier at 11:00 PM.  You will see in the TimeZoneOffset function (in the example of converting) that in order to correct, you are adding the timezoneoffset which is returned in minutes.

 

The templates are Sample Apps to help people get started on their own.  I don't believe they are intended to be "official apps" that are supported.  But, this particular question on the timezoneoffset in the templates has come up a few times, so, it's definitely not unknown.

 

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

You're right, it's working, I still don't understand why, I will read again... Here the final code :

Office365.GetEventsCalendarView(defaultCalendar,
Text(Value(DateAdd( startDate, TimeZoneOffset(  ), Minutes )),"[$-en-US]mm/dd/yyyy",Language()),
Text(Value(DateAdd( DateAdd(startDate,2,Days), TimeZoneOffset(  ), Minutes )),"[$-en-US]mm/dd/yyyy",Language())
).Values

 

BTW, when I have done my test today for india and usa eastern, we were all at the same day and the meeting also. Even without TimeZoneOffset it should work. That why it's strange for me, thx you for your contradiction ^^

View solution in original post

5 REPLIES 5
RandyHayes
Super User III
Super User III

@Jdriele 

You need to look at your date selections and usage in your formulas and make sure you are using the TimeZoneOffset function to adjust the dates properly. 

 

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Thx for you attention, but meetings are display in the wrong day. Not a prb of hours. Me and my colleagues are on Monday for the same meeting, just the hours should change.

 

BTW, why MS official template screen are not resilient for common regional issue

@Jdriele 

Understood, but, if there is just a date, then it will be whatever date and 12:00 AM by default (in whatever timezone it is in).  If you display that date in a timezone that is 1 hour more, then it is 1 hour less to the date, and thus, the date becomes a day earlier at 11:00 PM.  You will see in the TimeZoneOffset function (in the example of converting) that in order to correct, you are adding the timezoneoffset which is returned in minutes.

 

The templates are Sample Apps to help people get started on their own.  I don't believe they are intended to be "official apps" that are supported.  But, this particular question on the timezoneoffset in the templates has come up a few times, so, it's definitely not unknown.

 

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

You're right, it's working, I still don't understand why, I will read again... Here the final code :

Office365.GetEventsCalendarView(defaultCalendar,
Text(Value(DateAdd( startDate, TimeZoneOffset(  ), Minutes )),"[$-en-US]mm/dd/yyyy",Language()),
Text(Value(DateAdd( DateAdd(startDate,2,Days), TimeZoneOffset(  ), Minutes )),"[$-en-US]mm/dd/yyyy",Language())
).Values

 

BTW, when I have done my test today for india and usa eastern, we were all at the same day and the meeting also. Even without TimeZoneOffset it should work. That why it's strange for me, thx you for your contradiction ^^

View solution in original post

@Jdriele 

One thing to watch out for...you will want to put your date in the TimeZoneOffset function.

If you use TimeZoneOffset without a date, it will calculate the offset based on the current time zone, not the time zone of the actual date you want.

 

So, your formulas should have TimeZoneOffset(startDate) in them.

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (18,437)