Changing the Date Format

ramirch
Tera Contributor

Hello!

The system date format in our instances is YYYY-MM-DD. Is there a way to change this to MM-DD-YY without changing the system date format?

Thanks! 

3 REPLIES 3

Priyanka0402
Mega Sage
Mega Sage

Hello @ramirch ,

Yes you can change the instance Date format.

Follow below:

All>Basic Configuration UI16 

Select the format you want.

Priyanka0402_0-1681986401600.png

 

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

Regards

Priyanka

@Priyanka0402, I want to change the date format for a specific application or module only. I do not want to update the date format for the instance. Is this possible?

Hello @ramirch 

You can use the below code to format the date to MM-DD-YY

var date= new GlideDate();

                            //replace new GlideDate() with the incoming date

 var date2 = date.getByFormat('yyyy/MM/dd');

                         //now use the date2 to set the field value as you want

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

Regards

Priyanka