Hi everybody,
I'm creating an annual calendar. I need to get all days for each month like this
=================2020================
JANUARY FEBRUARY
Mon 1 Wed 1
Tue 2 Thu 2
Wed 3 Fri 3
Thu 4 Sat 4
Fri 5 Sun 5
So i've created a gallery for each month but actually the items are a list of 31 days like [1;2;3;4......]
How can i do to get all days of a month formatted like that "Mon 1"
Many thanks for help.
Regards,
Jean-Michel DOS SANTOS
Solved! Go to Solution.
This is easier to demonstrate than to explain. So, attached is a sample annual calendar app. Download it and save to your computer. Open a new or existing app in PowerApps designer. Go to the File menu. Choose Open. Choose Browse and then locate the file you saved to open.
Key items to observe. There is a main Gallery with 12 rows (horizontal). Each row as a sub gallery in it (vertical).
Formula on the primary Gallery Items:
ForAll(
Sequence(12),
{
Start: Date(Value(Label3.Text), Value, 1),
End: DateAdd(DateAdd(Date(Value(Label3.Text), Value, 1), 1, Months), -1, Days)
}
)
NOTE: in this particular app, there is a Label3 that indicates the Year (and can be changed via left and right arrow). This formula derives year from that label.
The sub gallery of days has the following formula on the Items property:
ForAll(
Sequence(DateDiff(ThisItem.Start, ThisItem.End, Days)+1),
Date(Value(Label3.Text), Month(ThisItem.Start), Value)
)
The rest is just labels for formatting the day.
I hope this is helpful for you.
This is easier to demonstrate than to explain. So, attached is a sample annual calendar app. Download it and save to your computer. Open a new or existing app in PowerApps designer. Go to the File menu. Choose Open. Choose Browse and then locate the file you saved to open.
Key items to observe. There is a main Gallery with 12 rows (horizontal). Each row as a sub gallery in it (vertical).
Formula on the primary Gallery Items:
ForAll(
Sequence(12),
{
Start: Date(Value(Label3.Text), Value, 1),
End: DateAdd(DateAdd(Date(Value(Label3.Text), Value, 1), 1, Months), -1, Days)
}
)
NOTE: in this particular app, there is a Label3 that indicates the Year (and can be changed via left and right arrow). This formula derives year from that label.
The sub gallery of days has the following formula on the Items property:
ForAll(
Sequence(DateDiff(ThisItem.Start, ThisItem.End, Days)+1),
Date(Value(Label3.Text), Month(ThisItem.Start), Value)
)
The rest is just labels for formatting the day.
I hope this is helpful for you.
User | Count |
---|---|
182 | |
123 | |
88 | |
45 | |
43 |
User | Count |
---|---|
247 | |
156 | |
127 | |
78 | |
73 |