Skip to content

Before Due Date

Last edited 181 days ago by Lukas Pavelka.
The Before Due Date function is created as Power Apps named Formula for informing application about input value that reaches due date.

Formula Code

BeforeDueDate(inputDate:Date,daysBefore:Number,outputMessage:Text):Text = If(
DateDiff(
Today(),
inputDate,
TimeUnit.Days
) <= daysBefore && DateDiff(
Today(),
inputDate,
TimeUnit.Days
) >= 0,
outputMessage,
""
);

Eye on Detail

Mostly, we play with Date functions in Power Apps. In this function we use function that returns the difference between two date/time values. If your provided number of days before due date, the function will compare it with difference and return your custom message. Otherwise, you will reach empty message.

Demo

Screenshot 2025-09-24 at 11.16.39.png


Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.