Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Convert Duration into minute

coolsaurabh
Tera Contributor

I have a field on incident table of duration type which contains days hours and minute . Is it possible to convert into minute and auto populate into another field.

Thanks,

Sourabh

6 REPLIES 6

Manny11
Tera Expert
var a = current.time_worked.getGlideObject().getNumericValue()
    gs.addInfoMessage(a);
    var durationMin = (a/1000/60);
    gs.addInfoMessage(durationMin);