TIME$ in seconds-after-"01/01/1970" format

is there a standard function to convert time$ into the 'seconds-after-1970'-format? this would be a lot easier and quicker for my database application which has to search on date/time very, very often

i know in unix this format is standard, but i haven;t seen it in vb yet.

It isn;t hard to program, but it seems kinda slow .. besides, i don;t know all the exceptions (which year had one day to many etc)
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Internally date/time is a double. Date is integer part, time is decimal. This makes date comparisions about as fast as you're going to get them.

DateDiff("s", DateSerial(1970, 1, 1), Now)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial

(Now - 25569#) * 86400
Right, but since time is already a *number* internally scaling up or down won't make the comparision operations any faster.

A Date is only a date when *displayed*. The internal comparisions are already in numeric. heit's idea for speeding things up will actually be SLOWER as the database is already doing what he wants internally.

If date/time were internally stored as character string he'd have a point. But since is *already* a number scaling won't run any faster and time lost in performing scale is wasted...

heitAuthor Commented:
deighton, thanx!

mark2150> ok, i didn't tell te whole story .... i have to make a lot of queries which load all data not older than 30 minutes .. i think doing it in integers is easier, also because now it is a lot easier for me to know which is 30-minutes-ago exactly. I see your point however ... thanx anyway!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.