Add Duration field to Start Date field



If you want to add a Duration field to a Date field, that is possible. Just copy paste the following Javascript code to a Calculation field:


var sd = @Start Date and Time;
var d  = @Duration;
var h  = Math.floor(d);
var m ;
var s ;

var r = d – h; r *= 600000; r = Math.round(r); r/= 10000; 
m = Math.round(r);
s = r – m; s *= 60000; s/= 1000; s = Math.round(s);

moment(sd).add(h, ‘hours’).add(m, ‘minutes’).add(s, ‘seconds’).toDate()

/* ——————————————————————————————————-

Created by BendixKiel ApS – Copenhagen based Podio Preferred Partner -with more than 6 years of experience in helping organizations implement Podio. Please feel free to contact us if you need help evaluate, structure or implement Podio in your organization.

BendixKiel ApS +45 71 99 05 80

———————————————————————————————————– */


Make sure you replace @Start Date and Time with your app’s Start Date field, and @Duration with your app’s Duration field

After applying the following code in Modify Template


we get the following result


No comments yet.

Leave a Reply