Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

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

suvro
Mega Sage

Use the below

 

var gdt1 = new GlideDate();
        gdt1.setDisplayValue(current.getValue('date'));
        var fDate = gdt1.getByFormat("dd MM YYYY");     
current.date = fDate    

where I have to use this code....?

 

How you are setting this field now ?

dictionary entry