need client script to subtract two different date/Time fields and result would be stored in another field

malaisamy1
Kilo Contributor

Hi Guys,

Here i will explain my scenario,

We have two date fields. Those two dates need to be subtracted and the result should be stored in another field.

I need a client script for this.

Could anyone please help me on this.

Thanks in Advance,

Thanks,

Malaisamy

7 REPLIES 7

malaisamy1
Kilo Contributor

Hi Balaji,



This i have tried but i am unable to achieve this. I will share my dev instance credentials..could you please help me on this



my Instance: ServiceNow



user: admin  


pwd: Riyamalai*1



Table : Test Table(just type in navigation menu);



Calculation fields: Opened date/time, Investigation completed date



Result Field: SI Actual




Please use this and   help me


fkhan
Kilo Guru

Check this link ,it may help you:Client Script Date/Time Functions


malaisamy1
Kilo Contributor

Thanks for the reply. But i am very new to the Service now. So some can help me by writing from your side for my Dev instance