Solved

calculate seconds since midnight

Posted on 2000-02-17
4
2,122 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
Comment Utility
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
Comment Utility
Use DateDiff function, setting the interval as "s"

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

Cheers.
0
 
LVL 3

Expert Comment

by:paulstamp
Comment Utility
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
Comment Utility
Just what I needed.

Thank you paulstamp
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now