Hi,
I'll be creating a validation wherein I need to check if the date is before or after two weeks from the current week.
Just wondering if there's available function that I can utilize for this requirement.
Thank you in advance.
Solved! Go to Solution.
Hi @Anonymous ,
I have used the formula If((Self.SelectedDate>(Today()-14) && Self.SelectedDate<(Today()+14)),Self.SelectedDate,"Select valid date") to show the warning notification on selection of date in the date picker. You have to use the same formula in both OnSelect and OnChange. Apart from this I have also set the Start Year and End Year in advanced properties of date picker to 2021. So that user can see only the current year calendar.
If you find my solution helpful for resolving the issue, then please consider Accept it as the solution to help the other members find it more quickly.
You can just compare the date of a record to Today()+14 using If(
This does require that the column is a date argument, if its Text you'd have to convert it to a Date first.
Or is this not what you need?
@Anonymous in addition to Kvb1's answer which compare your date in your record to Today's date, if you want to actually compare out with respect to the current week. then you can use Weekday function. with this, find out the current week's start and end date first. then if you want to compare before, use the start date of the current week minus (-) 14, and if you want to compare after, use the end date of the week plus (+) 14.
Hi @Anonymous ,
I have used the formula If((Self.SelectedDate>(Today()-14) && Self.SelectedDate<(Today()+14)),Self.SelectedDate,"Select valid date") to show the warning notification on selection of date in the date picker. You have to use the same formula in both OnSelect and OnChange. Apart from this I have also set the Start Year and End Year in advanced properties of date picker to 2021. So that user can see only the current year calendar.
If you find my solution helpful for resolving the issue, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks so much... This helped!!!
User | Count |
---|---|
119 | |
86 | |
83 | |
74 | |
69 |
User | Count |
---|---|
215 | |
179 | |
141 | |
109 | |
83 |