how to convert the date format

hemanth40
Tera Contributor
"hireDate": "/Date(1682726400000)/",
 
how can i convert this to date format?
1 ACCEPTED SOLUTION

example script:

var dateStr = "/Date(1682726400000)/";

var intDate = dateStr.substring(dateStr.indexOf("(")+1, dateStr.indexOf(")"));

var gdtTesting = new GlideDateTime();
gdtTesting.setNumericValue(intDate);
gs.log(gdtTesting);

 

 

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

View solution in original post

5 REPLIES 5

Super its working , Thanks a Lot Bro.