Solved

Converting decimal time to standard

Posted on 2004-04-14
1
293 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
monkesdb earned 50 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

734 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