fennerhillpro
MIS
I am a Newbee and working on Ver 9. I need to get the time diff between time in and time out which the formula below works fine for. However, I also need to find the aveage and mean times and display and since they are a string I can't. I can display in sec or Min (by adding /60) but Icannot figure out how to then convert back to time so it displays back to 7:12.
numberVar dur := datediff("s",{@admitdatetime},{@disch datetime}); //get the seconds between 2 dates
numberVar hrs;
numberVar min;
stringVar hhmmss;
hrs := Truncate(Truncate(dur/60)/60);
min := Remainder(Truncate(dur/60),60);
hhmmss := totext(hrs, "0"
+ ":" + totext(min, "00"
;
hhmmss
Thanks,
Paul
numberVar dur := datediff("s",{@admitdatetime},{@disch datetime}); //get the seconds between 2 dates
numberVar hrs;
numberVar min;
stringVar hhmmss;
hrs := Truncate(Truncate(dur/60)/60);
min := Remainder(Truncate(dur/60),60);
hhmmss := totext(hrs, "0"
hhmmss
Thanks,
Paul