Limiting Date Interfaces' Date range
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
I am creating an application that allows a user to select a date via the Date interface tool. I want to limit the user's ability to select a date that is 13 months prior to the present date (DateTimeNow()). Does this feature exist within the Date interface tool?
Thanks for your help!!
Solved! Go to Solution.
- Labels:
- Interface Tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @SergioWW
You can connect the Date Interface Tool to an Error Message Tool to throw an error message and halt the app/macro from running. Here is one that I built to verify that the start date was not greater than the end date.
For the expression, you could use something like.
DateSelected <= DateTimeFormat(DateTimeAdd(DateTimeToday(),-13,"months"),'%Y-%m-%d')
DateSelected in the above would need to be your line into the error message tool, but the rest of the formula is continuously calculating 13 months back from todays date.
If this solves your issue please mark the answer as correct, if not let me know!
Thanks!
Phil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This worked perfectly! Thank you!
