Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
for school i got an assignment, wich stated we had to create a program in Quickbasic that would let you convert a decimal time (like 3,14 hours) to HH:MM:SS.
now i know how to do this on paper or in my head or what ever, but i have absolutly no clue how i should do this in quickbasic
That's great, Iggy! Glad you found a program that does what you need. The program seems very clear and well done.
Now, PLEASE read the program and try to understand each and every line of it, as that is the only way that you will benefit from the program, believe me!
Then, if you have questions, folks here will be happy to help you out with good answers.
Ralph. Running QuickBASIC Version 4.5, Windows XP Home Edition, Version 2002, Service Pack 2, and HP LaserJet 4L printer.
this is assuming you are using seconds as the input or such..
here is another way:
create a blank string (empty ) to hold the desired output : tim$
like this tim$=""
split the number into separate parts:
hour%=seconds%/3600
min% = (seconds% mod 60)/60
sec =seconds% mod 60
then convert each to strings
tim$ =str$(hour%)+":"+str$(min%)+":"+str$(sec%)
something like that anyways...