- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2024 12:13 PM
Hi All,
We have two variables on the catalog form Start Date & End Date
Difference between the variables can not be greater than 3 months.
For Example: If Start Date is 17-Jan-2024 then the End Date (I.e.., 16-Apr-2024) should be less than 3 months
If the user enters after 16-Apr-2024 it should throw an error.
ISSUE: Date type variable returns the below value
Logs:
How can we achieve this using this format.
Thank you!!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2024 11:26 PM - edited ‎01-16-2024 11:27 PM
So have you looked into no code date validation at all? The article also contains an example of what you are after, only thing is the example is on hours, which you can just choose a different operator for.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2024 11:25 PM
Hi Mark,
Thanks for the reply!!
My requirement is Start Date and End Date cannot be greater than 3 months.
Example: If Start Date is 17-Jan-2024 then End Date should be less than 16-Apr-2024.
Thank you!!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2024 11:26 PM - edited ‎01-16-2024 11:27 PM
So have you looked into no code date validation at all? The article also contains an example of what you are after, only thing is the example is on hours, which you can just choose a different operator for.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2024 02:38 AM
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2024 02:52 AM
Hi Atul,
There's no reason to script such. What's the reason for sharing a scripted solution and making things unnecessarily complicated and unmanageable?
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2024 02:54 AM
There are many ways to do a work , I agree scripting is not best always where work can be done without code. Giving option is not a bad choice.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************