Hi.
I want to convert, let say 207 seconds to 3 minutes and 27 seconds. I tried:
Is there a way of retrieving the integer from a division, in this case 3 and not 3,45?
What I really want is to subtract two timestamps. Will that be possible in v.3.4 by subtracting two GETTIME() calls, one at the start of the script, and one at the end and print the result in hours, minutes and seconds?
Lars H.
I want to convert, let say 207 seconds to 3 minutes and 27 seconds. I tried:
Code: Select all
But that showed: 3.45 minutes 0 seconds and I wanted 3 minutes 27 seconds$a=207
$c=$a/60
$d=$c*60
$e=$a-$d
PRINT($c ." minutes ". $e." seconds")
Is there a way of retrieving the integer from a division, in this case 3 and not 3,45?
What I really want is to subtract two timestamps. Will that be possible in v.3.4 by subtracting two GETTIME() calls, one at the start of the script, and one at the end and print the result in hours, minutes and seconds?
Lars H.
Hi Lars,
ScriptFTP division are supposed to be integer divisions, in other words, you have found a bug. The expected result of 3/2 is not 1.5, is 1.
It seems that in the last version 3.3, some modifications introduced this bug. I have fixed it and it is available in the 3.4 beta. It can be downloaded from here:
http://www.ScriptFTP.com/ScriptFTP_devel_setup.exe
ScriptFTP division are supposed to be integer divisions, in other words, you have found a bug. The expected result of 3/2 is not 1.5, is 1.
It seems that in the last version 3.3, some modifications introduced this bug. I have fixed it and it is available in the 3.4 beta. It can be downloaded from here:
http://www.ScriptFTP.com/ScriptFTP_devel_setup.exe
liked Script FTP? Try our other product Email Parser