cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lvczk
Frequent Visitor

Starting day of the week (Sunday to Monday)

Hello everyone!

 

I am making a custom gallery calendar, and I have a label with the following formula: Calendar.WeekdaysShort()

 

By default, the starting day of the week is Sunday, but I would like it to be Monday

 

Picture context: "vas" means "sun", "hét" means "mon" etc...

I would like it to be to start from Monday.

2022-04-04_13h29_21.png

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @lvczk,

Do you want to change the first day as Monday using the Calendar.WeekdaysShort()?

 

If you want to achieve this using the Calendar.WeekdaysShort(), I am afraid there is no OOTB in Power Apps. You could directly replace it with [ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" ].

 

Then I will suggest you use the Calendar template within Power Apps, and you should modify something as below:

There is a small change required to the calculation of the first day in view variable

Set(_dateSelected, Today());         
Set(_firstDayOfMonth, DateAdd(Today(), 1 - Day(Today()), Days));         
Set(_firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 ), Days));         
Set(_lastDayOfMonth, DateAdd(DateAdd(_firstDayOfMonth, 1, Months), -1, Days))
Best Regards,
Qi

View solution in original post

3 REPLIES 3
Nogueira1306
Super User
Super User

https://www.youtube.com/watch?v=SlfnhQgMXrY

 

https://www.youtube.com/watch?v=8qqEfzdVM0Y

 

https://www.youtube.com/watch?v=8qqEfzdVM0Y

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,

Gonçalo Nogueira

Check my LinkedIn!

Buy me a coffee!

Check my User Group (pt-PT)!

Last Post on Community

My website!

v-qiaqi-msft
Community Support
Community Support

Hi @lvczk,

Do you want to change the first day as Monday using the Calendar.WeekdaysShort()?

 

If you want to achieve this using the Calendar.WeekdaysShort(), I am afraid there is no OOTB in Power Apps. You could directly replace it with [ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" ].

 

Then I will suggest you use the Calendar template within Power Apps, and you should modify something as below:

There is a small change required to the calculation of the first day in view variable

Set(_dateSelected, Today());         
Set(_firstDayOfMonth, DateAdd(Today(), 1 - Day(Today()), Days));         
Set(_firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 ), Days));         
Set(_lastDayOfMonth, DateAdd(DateAdd(_firstDayOfMonth, 1, Months), -1, Days))
Best Regards,
Qi
usaman45
Helper III
Helper III

Great, but it looks missing the last Sunday on the last row. Anyway to fix it?

usaman45_0-1656017907694.png

 

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (4,954)