Change the date format using server script

RK41
Tera Expert

Hi,

I have one date field variable in my catalog item. The default format of date field is "12-APR-2022" when i try to get this variable using script.

But I want to convert this format like below using script include. Please share your thought on this.

 "2022-04-12"

 

Thanks,

10 REPLIES 10

@RK 

Did you get a chance to check my solution?

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

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader