Date Formate for differ users causing issue while performing Date validations.

Rajyalakshmi
Tera Contributor

1.We need to validate date field value should be in 12 months range from current date.

2.In our ServiceNow instance we have different date formats  for few users.

3.Our date validation script is working fine for the users preference date format is YYYY-MM-DD .for other users who are having different date format for example yyyy/mm/dd or dd-mm-yyyy ,script getting failed.

4.Could you please suggest is there any global functionality is there to set date format in YYYY-MM-DD irrespective of user preference date format .

2 ACCEPTED SOLUTIONS

Ankur Bawiskar
Tera Patron
Tera Patron

@Rajyalakshmi 

you should use UI policy so that date format is taken care of and you need not worry on it.

No Code date validations through (Catalog) UI Policies 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

@Rajyalakshmi 

why not? UI policy can be created against any table and table's field.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

8 REPLIES 8

This is a better approach than my suggestion, if the requirements fit.

Will be less complicated.

Good call Ankur!

@Rajyalakshmi 

Thank you for marking my response as helpful.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar ,

 

Thank you so much for the help.

 

for my use case ,i need to do date validation on kb_knowledge form.

can i create UI policies for this ?

@Rajyalakshmi 

why not? UI policy can be created against any table and table's field.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader