PrashantLearnIT
Giga Sage

Script - 

var gdt = new GlideDateTime('2023-12-13 08:00:00'); // Check your system datetime format if you don't get desired result
gs.info(new GlideTimeAgo().format(gdt));

 

Result - 

Capture.PNG

 

If my content helped you in anyway, please mark this content as BOOKMARK, SUBSCRIBE & HELPFUL

 

Best Regards,

Prashant Kumar (LearnIT)

 

YouTube Channel LearnIT: https://www.youtube.com/@learnitwithprashant

Blog LearnIT: https://medium.com/@LearnITbyPrashant

Prashant Kumar LinkedIn: https://www.linkedin.com/in/learnitbyprashant/

ServiceNow Community Prashant Kumar - https://www.servicenow.com/community/user/viewprofilepage/user-id/19635