Question on SR date variable

Mani60
Tera Contributor

HI All,

 

On Catalog Item form Now I have date variable format is YYYY/MM/DD to MM/DD/YYYY

 

Can anyone please help me how to get the solution for this.

Mani60_0-1703243132374.png

 

 

Thanks,

1 REPLY 1

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Mani60 

 

As per below link it is not possible to get the portal on new format. Have a look of replies in below link and do needful

 

https://www.servicenow.com/community/itsm-forum/how-to-change-date-format-from-yyyy-mm-dd-to-dd-mm-y...

 

var MyDate = g_form.getValue('your variable name') ;

var gdt = new GlideDateTime(myDate);

gdt.setDisplayValue("myDate","dd-MM-yyyy HH:mm:ss");//uses current user session time zone 
*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************