heit
asked on
TIME$ in seconds-after-"01/01/1970" format
is there a standard function to convert time$ into the 'seconds-after-1970'-forma t? 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)
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)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
or
(Now - 25569#) * 86400
(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...
M
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...
M
ASKER
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!
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!
M