How to change the date format (YYYY,MM,DD) to (DD,MM,YYYY) in the case fom.

poornima batchu
Tera Expert

HI,

I created a date field in the hr case form but the default format is (YYYY, MM, DD) this I want to change the format of my field only to (DD,MM, YYYY).Please add the possible solutions to achieve this.

Thank youfind_real_file.png

16 REPLIES 16

Please update the old filed back end name in the script .I think you have updated with new field name

var gDateTime = new GlideDateTime(current.u_date.getDisplayValue());

In this line in current.u_Date -- > you need to update the old field back end name  instead of newly created string field name 

is there a way I can solve this by using client scripts.

Sorry we cant do it .This is the only way or try using the property that i mentioned below

1) Open sys_properties table

2) search for this property named as "glide.sys.date_format"

3)Change the format according to your requirement from yyyy-MM-dd --> dd-MM-yyyy in value field 

But this would change it across the instance

Please accept the solution if it helped you in understanding 

Community Alums
Not applicable

Hello,

By default instance date format is "yyyy-MM-dd",  you simply may use the Application Navigator and navigate to System Properties > Basic Configuration. There, in the form there is a filed called "Date format". You can change the format of the instance to "dd-MM-yyyy" from there and then save the change.

Kindly note that, it will change for whole instance.

Using script also, it will not allow you to set value since date format of field is different.

 

Thanks
Akshay Kangankar
Please Mark ✅ Correct/helpful, if applicable,

HI akshay, 

In my business requirement I have to create a date field in this (DD, MM, YYYY) in this format. I created a field but it is taking default format if i change the basic configuration it will only change for me  but it the field should be in this format (DD,MM, YYYY) for every agents working on this case form