Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Runtime in Batch vs Online

Status
Not open for further replies.

kskid

Technical User
Mar 21, 2003
1,767
US
CR 8.5, Oracle 8i

I have the following formula in the report footer. I use currentdatetime since I am creating a pdf file with no printer specified.

WhilePrintingRecords;
NumberVar TotalSec := datediff("s", Datetime(DataDate,DataTime),CurrentDateTime);
NumberVar Days := Truncate (TotalSec / 86400);
NumberVar Hours := Truncate (Remainder ( TotalSec,86400) / 3600);
NumberVar Minutes := Truncate (Remainder ( TotalSec,3600) / 60);
NumberVar Seconds := Remainder ( TotalSec , 60);
"Total Run Time = " +
Totext ( Days, '00', 0,'') + ' '+
Totext ( Hours, '00', 0,'') + ':'+
Totext ( Minutes,'00', 0,'') + ':'+
Totext ( Seconds,'00', 0,'')

When I run this report online, it works fine but is coming up with zero or negative numbers when it runs in batch.

Any ideas?
 
No, CR Developer.

Also, the scheduling program was written in VB 6. Maybe I should be addressing this thread in that forum?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top