Alright, so I've gone through the majority of the threads and I think I'm almost there.
I'm trying to determine the amount of time it takes from when a task is created to when it is completed.
I have two datetime formulas. One for start and one for end.
I'm all the way to trying to get an average of this formula:
//Named Date Difference
whileprintingrecords;
numberVar dur := datediff("s",{@Date/Time Created}, {@End Date/Time}); //get the seconds between 2 dates
numbervar days;
numberVar hrs;
numberVar min;
numberVar sec;
stringVar ddhhmmss;
days:= Truncate(Truncate(Truncate(dur/60)/60)/24);
hrs := Remainder(Truncate(Truncate(dur/60)/60),24);
min := Remainder(Truncate(dur/60),60);
sec := Remainder(dur,60);
ddhhmmss := totext(days,0,"") + ":" + totext(hrs,"00") + ":" + totext(min,"00") + ":" + totext(sec,"00");
ddhhmmss
I saw Lbass respond to an earlier thread, saying to use this formula to get it back into minutes then use the above formula and have dur be the average formula. But every time I do that, it says that my average formula cannot be summarized. Any suggestions?
Formula I'm using to convert the above back to minutes:
//named Average
stringvar array y := split({@Date Difference},":");
val(y[1])*1440+
val(y[2])*60+
val(y[3])
Any help would be appreciated. If you need more information, please let me know.
Thanks,
Ryan
I'm trying to determine the amount of time it takes from when a task is created to when it is completed.
I have two datetime formulas. One for start and one for end.
I'm all the way to trying to get an average of this formula:
//Named Date Difference
whileprintingrecords;
numberVar dur := datediff("s",{@Date/Time Created}, {@End Date/Time}); //get the seconds between 2 dates
numbervar days;
numberVar hrs;
numberVar min;
numberVar sec;
stringVar ddhhmmss;
days:= Truncate(Truncate(Truncate(dur/60)/60)/24);
hrs := Remainder(Truncate(Truncate(dur/60)/60),24);
min := Remainder(Truncate(dur/60),60);
sec := Remainder(dur,60);
ddhhmmss := totext(days,0,"") + ":" + totext(hrs,"00") + ":" + totext(min,"00") + ":" + totext(sec,"00");
ddhhmmss
I saw Lbass respond to an earlier thread, saying to use this formula to get it back into minutes then use the above formula and have dur be the average formula. But every time I do that, it says that my average formula cannot be summarized. Any suggestions?
Formula I'm using to convert the above back to minutes:
//named Average
stringvar array y := split({@Date Difference},":");
val(y[1])*1440+
val(y[2])*60+
val(y[3])
Any help would be appreciated. If you need more information, please let me know.
Thanks,
Ryan