web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Calculating the date f...
Power Apps
Unanswered

Calculating the date for a date picker field

(0) ShareShare
ReportReport
Posted on by 23

In my Power Apps app I have the following scenario:
in the list ParametroAtosJudiciais I have a column called PrazoDecorrenteAto and next to it another column called DiasUteis. Each Prazo (Deadline) has a corresponding DiaUtil (business day) (Example: the Deadline GENERATE THE INITIAL COSTS GUIDE has the value 15 in the business day column). Inside my app, I have a date selector field that should show the date corresponding to the following calculation: today's date + number of days defined when the user selects the Deadline (instantiated in the column DiasUteis) + 1. What is happening is the following: let's consider today 07/17/2023 (Monday); this code is not only bringing the days considered business days in the list DiasUteis, it implies that, if in the column DiasUteis of the list ParametroAtosJudiciais we have the value 15, the day that appears in the date selector field is 02/08/2023 (17/ 07/2023 + 15 days + 1) that is, the calculation is considering all days, even those that are not classified as business days, and the correct date should be 07/08/2023 (07/17/2023 + 15 business days + 1). Currently, the code that is in the DefaultDate property of the date picker field is:
if(
LookUp(
ParameterJudicial Acts;
TermDecurrentAto = cmbAdvogadoRedatorVisualizacaoProcesso_5.Selected.Value;
aux
) <> 1 && LookUp(UseDays; Date >= dtPublicacaoVisualizacaoProcesso.SelectedDate).UtilDay = "Yes";
DateAdd(
dtDataPublicacaoVisualizacaoProcesso.SelectedDate;
LookUp(
ParameterJudicial Acts;
TermDecurrentAto = cmbAdvogadoRedatorVisualizacaoProcesso_5.Selected.Value).DaysWorking
+ 1
;TimeUnit.Days)
)
I don't know if I made myself clear, but we have the COLUMN DiasUteis in the list ParametroAtosJudiciais and the LIST DiasUteis, which is like a calendar containing two columns, one with the dates and the other with the text YES or NO to classify the date as a working day or not

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard