Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How do I convert Date Time field value to epoch seconds?

karthik85
Kilo Expert

I need to convert closed date into epoch seconds and put the value in other field. Any help is appreciated.

1 REPLY 1

manish64
Giga Guru

 

Please mark reply as Helpful/Correct, if Helpful. Thanks!

var gdt = new GlideDateTime();
gdt.setValue(current.getValue('sys_created_on'));
var ms = gdt.getNumericValue();