I use the following formula to convert a field "total seconds' to a 'days hours minutes seconds' format. I actually want to it to display 'days hours minutes'...no seconds... How can I modify the formula so that if the formala does incounter a 'seconds' amount of , lets say, 45, it will round up the minute?
Example: total seconds is = 295
I want the formula to produce the result: "three minutes" (since 295 seconds is actualy 2 minutes 55 seconds). I don't want the formula to say "2 minutes"
********************
WhilePrintingRecords;
NumberVar TotalSec := {@Date_Diff_Seconds};
NumberVar Days := Truncate (TotalSec / 86400);
NumberVar Hours := Truncate (Remainder ( TotalSec,86400) / 3600);
NumberVar Minutes := Truncate (Remainder ( TotalSec,3600) / 60);
Totext ( Days, '00', 0,'') + ' days '+
Totext ( Hours, '00', 0,'') + ' hours '+
Totext ( Minutes,'00', 0,'') + ' minutes '
Example: total seconds is = 295
I want the formula to produce the result: "three minutes" (since 295 seconds is actualy 2 minutes 55 seconds). I don't want the formula to say "2 minutes"
********************
WhilePrintingRecords;
NumberVar TotalSec := {@Date_Diff_Seconds};
NumberVar Days := Truncate (TotalSec / 86400);
NumberVar Hours := Truncate (Remainder ( TotalSec,86400) / 3600);
NumberVar Minutes := Truncate (Remainder ( TotalSec,3600) / 60);
Totext ( Days, '00', 0,'') + ' days '+
Totext ( Hours, '00', 0,'') + ' hours '+
Totext ( Minutes,'00', 0,'') + ' minutes '