Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query On Time

Status
Not open for further replies.

WaxyWebber

Technical User
Sep 29, 2004
1
GB
I have a Access db which contains a Time field (Short Time Format - eg: 9:12 , 23:10, etc)

Now I want an asp page to return results from this db where the time field = local system clock time.

I'm a bit stumped... I can write a query using db wizard where Time>Time() or Time<(), they work but Time=Time() reutrns nothing (there are entries in the db for every minute of the day). Can some explain what's happening here?

Also, from the asp page if I enter any Time() criteria eg Time < > or = Time() it returns a "Data type mismatch in criteria expression" error. Can anyone help me out.

Thanks
 
Hi,

Time is a value that is in a fraction of a day.

I can understand why you got NOTHING. I'd be supprised if you got SOMETHING.

Try
[tt]
Where Format(time, "hh:nn") = Format(time(), "hh:nn")
[/tt]


Skip,

[glasses] [red]Be advised:[/red] When transmitting sheet music...
If it ain't baroque, don't fax it! [tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top