Covert numeric value to date. Example : 1092715200
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2021 05:54 AM
I am working with migration from remedy and i am getting numeric value for date in excel. So i want to convert that number into date for servicenow.
Labels:
1 REPLY 1

Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2021 06:17 AM
That's the number of seconds since the epoch (1/1/1970), so the example you've given is 17 Aug 2004 04:00:00 GMT.
Here's a function to help you out:
var demo = secondsToDate(1092715200)
function secondsToDate(sec){
var gdt = new GlideDateTime("1970-01-01 00:00:00");
gdt.addSeconds(sec)
return gdt
}
a gs.info on demo would return:
2004-08-17 04:00:00