WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: seckner on November 24, 2014, 08:33:33 AM

Title: Simple math
Post by: seckner on November 24, 2014, 08:33:33 AM
Simple to all except me obviously - Setting up an Elapsed Time counter - I've got it counting seconds and displaying those seconds BUT can't quite figure out how to have it show 5:00 minutes vs. 300 seconds. Any help appreciated!
Title: Re: Simple math
Post by: td on November 24, 2014, 08:58:44 AM
One of several approaches

Code (winbatch) Select

nSecs = 300
strMinSec = nSecs/60:':':StrFixCharsL(nSecs mod 60, '0', 2)