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.

setDisplayValue is not converting this date format properly 'MM/dd/yy HH:mm:ss'

Brian Terrick
Tera Contributor

When attempting to convert a string in this format 'MM/dd/yy HH:mm:ss' to 'yyyy-MM-dd HH:mm:ss' setDisplayValue does not return the proper year.

 

Example:

Original: 01/02/25 10:50:40

Returns: 0025-01-02 15:50:40

 

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

@Brian Terrick 

please share your script

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