Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21260

[RESOLVED] Converting decimal values into time

$
0
0
This appears to be the last problem I should have to solve in my program and that is converting the time decimal output back into time format, hh:mm, I have devised a formular that works on paper so to speak, but I just can't get it to work in code. The formular is simple. I need to subtract the whole number from the decimal and then multiply the remaining decimal fraction by 60 to come up with the minutes, e.g. 11.5422 - 11 leaves me with the decimal .5422 which is then multiplied by 60, which gives me 32 minutes and point some odd seconds. My problem is finding a way to code this formular to subtract an unknown varible much like the way I created my tables using a text box input for the table name. Basically the formular looks like this, (x.yyyy-x)*60.

What I need is a place holder within the code that represents the unknown whole number in the decimal time output that vb will fill with that number and continue on through the rest of the formular. Any ideas and suggestions would be greatly appreiated.

Viewing all articles
Browse latest Browse all 21260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>