Solved

calculate seconds since midnight

Posted on 2000-02-17
4
2,151 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB error "Type mismatch" 2 59
How to debug this code 7 64
Run code from text file in vb 1 71
Collapse and expand table in Word 2010 2 29
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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 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…
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…

809 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