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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

parameter query with date() and time() criterium 1

Status
Not open for further replies.

Pampers

Technical User
Apr 7, 2004
1,300
AN
Hi everyone,
I have a query qryWhiteboard displaying vessels approaching our port on an estimated time of arrival (ETA). If the ETA is in the past, it 'falls' of the Whiteboard.

The ETA is made up out of two fields, EtaDay and EtaTime. To select the vessels for my Whiteboard, I use(d) the criterium EtaDay >=Day(). Now I also want to use >=Time() on EtaTime. But it leaves out vessel that will arive at 09:30 although the real time is 09:00. How do I precise the criterium for EtaTime??

Pampers [afro]
YThere are only one way to change a diper - fast
 
Oeps, forgot the code:

Code:
WHERE (((tblOperations.[ETA d])>=Date()) AND ((tblOperations.[ETA t])>Time() Or (tblOperations.[ETA t]) Is Null)) OR (((tblOperations.[in port])=True)) OR (((tblOperations.[off port])=True))
ORDER BY tblOperations.[ETA d], tblOperations.[ETA t];

Pampers [afro]
YThere are only one way to change a diper - fast
 
WHERE tblOperations.[ETA d]+tblOperations.[ETA t]>Now() OR tblOperations.[ETA t] Is Null OR tblOperations.[in port]=True OR tblOperations.[off port]=True

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Tnx PHV,
I will give it a go tomorrow at work. I let you know how it works out...

Pampers [afro]
There is only one way to change a diper - fast
 
Hi PHV,
That works nice. I left out the 'OR tblOperations.[ETA t] Is Null', because that selects all the empty [Eta t]. Better so, because that means that the operations department has to set an arrival time. Code used:

Code:
WHERE ((([tblOperations].[ETA d]+[tblOperations].[ETA t])>Now())) OR (((tblOperations.[in port])=True)) OR (((tblOperations.[off port])=True))

Pampers [afro]
There is only one way to change a diper - fast
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top