Notifications
Announcements
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.
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!!!
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 796 Most Valuable Professional
Michael E. Gernaey 327 Super User 2025 Season 2
Power Platform 1919 268