Date Type Variable Format - 3 Months Validation

dharanikumar
Giga Guru

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 

dharanikumar_0-1705435750207.png

 

Logs: 

dharanikumar_2-1705435891088.png

 

How can we achieve this using this format.


Thank you!!

 

1 ACCEPTED SOLUTION

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

LinkedIn

View solution in original post

16 REPLIES 16

That's not really what's behind all your responses 🙂 The way you are responding on the community lately is way too obvious.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

I surrender my case.. not want to go in other direction. Rest upto you , what you think. 

*************************************************************************************************************
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/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************