Change date format of a catalog item variable date field

MelvinBulan
Tera Contributor

Is there a way I can change the date format to this kind of format?

MelvinBulan_0-1669632585724.png

 

When I select a date it becomes like this

MelvinBulan_1-1669632606135.png

This is my date variable

MelvinBulan_2-1669632616318.png

 

Is it possible to add something/configure this script? I have this script cause I had to make it so it wont select the past date. Would it be possible to add something to these scripts so it will change the format to dd-Month(or MM)-YYYY

 

onChange Script: 

MelvinBulan_0-1669633830137.png

 

Script Include: 

MelvinBulan_1-1669633852225.png

 

 

6 REPLIES 6

Voona Rohila
Kilo Patron
Kilo Patron

hi @MelvinBulan 

The validation can be done with UI Policy with no code, check below link

 

https://www.servicenow.com/community/developer-articles/no-code-date-validations-through-catalog-ui-...


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Hello Rohila,

How do I change the format of the date as mentioned above?

Hi @MelvinBulan 

The format which is shown is as per logged in user's date format, It should be changed at system level for all users or user level.


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

charukamble
Tera Contributor

Did you find the solution for it?
I have same question
please help if you know the solution