Page loading

Share your opinion
What do you think about gambaslinux.fr?
 
Interesting
It miss some informations
Excellent website
Results
WIDGETS GAMBAS
GAMBAS 3 SOFTWARES
TUTORIALS
Library
_gb3.pngAction sur les variables - Convert seconds in hour minutes seconds
Convert seconds in hour minutes seconds


Hi,
Today one very interesting easyest way to convert seconds in hour/minute/seconds.

Example :
I want to convert 5000 seconds in hour/minute/seconds
Here you find code :

PUBLIC SUB Main()
DIM myseconds AS INTEGER = 5000
PRINT Format$(Date(0, 0, 0, 0, 0, 0, myseconds * 1000), "hh nmin ssec")
END



Some explainations :
Date follow is writen with this format :

Date(year,month,day,hour,minute,second, millisecond)
That's why i have multiplyed by 1000

if we would convert minutes, we should write:

PRINT Format$(Date(0, 0, 0, 0, 0, 0, myminutes * 600000), "hh nmin ssec")

Thanks for your attention.





Creation date : 02/11/2020 @ 06:55
Last update : 02/11/2020 @ 06:55
Category : Action sur les variables
Page read 2292 times


Print the article Print the article


react.gifReactions to this article

Nobody gave a comment yet.
Be the first one to do it!


QUICK MENU
SEARCH




LANGUAGE
COMPONENTS
Other
LANGUAGE
Where, who?
VISITS

   visitors

   visitor online

ARCHIVES GAMBAS 1/2
^ Top ^