Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

How to change Date Format from YYYY-MM-DD to DD/MM/YYYY on Portal?

dgarad
Tera Sage

How can I change the date variable format from YYYY-MM-DD to DD/MM/YYYY?

dgarad_0-1748279629906.png

 

If my answer finds you well, helpful, and related to the question asked. Please mark it as correct and helpful.

Thanks
dgarad
1 REPLY 1

Cheikh Ahmadou
Kilo Sage

The system’s default date format is controlled by the glide.sys.date_format property, which is set to YYYY-MM-DD by default. Changing this property globally could impact other parts of the platform, so it’s not recommended for isolated use cases.

 

Additionally, it’s important to note that a client script cannot set a date variable using a different format (e.g., DD/MM/YYYY), as the system will not recognize it as a valid date input.

 

Recommended approach:

Create a custom string variable to hold the formatted date (DD/MM/YYYY). Then, use a client script to convert the original date and populate this string field for display purposes only.