Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Converting decimal time to standard

Posted on 2004-04-14
1
Medium Priority
?
297 Views
Last Modified: 2010-05-02
how do I convert the following time which is in decimal format;

6.21207295

to

6:12:43.46


Thanks
0
Comment
Question by:lehman6676
1 Comment
 
LVL 3

Accepted Solution

by:
monkesdb earned 200 total points
ID: 10824442
lehman6676,

i assume without working it through it's

val = 6.21207295

hours = int(val)
val = val - hours
val = val * 60
mins = int(val)
val = val - mins
val = val * 60
secs = int(val)
val = val - secs
val = val * 1000
millis = int(val)

MsgBox hours & ":" & mins & ":" & secs & "." & millis

val should equal 0 by this point
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question