Hi @CSilva
In PowerApps, the Weekday function can be used to find the day of the week for a date (1 for Sunday, 2 for Monday, and so on). Create a Label control to display.
// Start of the week (Monday)
DatePicker1.SelectedDate - Weekday(DatePicker1.SelectedDate, StartOfWeek.Monday) + 1
// End of the week (Sunday)
DatePicker1.SelectedDate - Weekday(DatePicker1.SelectedDate, StartOfWeek.Monday) + 7
(Or)
Use Collection:
ClearCollect(
WeekStartEnd,
{
StartOfWeek: DateAdd(DatePicker1.SelectedDate, 1 - Weekday(DatePicker1.SelectedDate, StartOfWeek.Monday), TimeUnit.Days),
EndOfWeek: DateAdd(DatePicker1.SelectedDate, 7 - Weekday(DatePicker1.SelectedDate, StartOfWeek.Monday), TimeUnit.Days)
}
)
Thanks!
If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.