Solved

calculate seconds since midnight

Posted on 2000-02-17
4
2,141 Views
Last Modified: 2008-03-17
how to calculate calculate seconds since midnight?
0
Comment
Question by:taimur
  • 2
4 Comments
 
LVL 12

Expert Comment

by:roverm
ID: 2533972
Use the Timer object. It returns a Single containing the seconds passed since midnight !!!

'Msgbox Timer'

Good luck !

RoverM
0
 
LVL 3

Accepted Solution

by:
paulstamp earned 10 total points
ID: 2533995
Use DateDiff function, setting the interval as "s"

MsgBox DateDiff("s", "00:00:00", Time)

Cheers.
0
 
LVL 3

Expert Comment

by:paulstamp
ID: 2533997
The above DateDiff is useful as it can be used to find seconds elapsed since any time or date, in intervals from years down to seconds.
0
 

Author Comment

by:taimur
ID: 2534279
Just what I needed.

Thank you paulstamp
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

770 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