JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Skip to content
Power Apps UDF Cooker
Introduction
About Author
UDF Functions
More
Share
Explore
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
DateDiff
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
← First Day of Month
Has Available ->
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
Ctrl
P
) instead.