SQL Time Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two columns - one is the date and the other is the time. I am trying
to extract all records from 07:00 - 00:00.

I have put this in the query design grid
#7:00:00 AM# And >#12:00:00 AM#

When I look at the SQL, it comes out like this:

((([2 Current Schedule].[Job Start Time])>#12/30/1899 7:0:0# And ([2
Current Schedule].[Job Start Time])>#12/30/1899#));

Does anyone now what I need to put in the Grid (criteria) to just extract
times only?

Thanks,
GLT
 
All date/time values contain a date and time value. 12/30/1899 has a "date"
equivalent of 0. This suggests the date portion will have no effect on your
query.

--
Duane Hookom
MS Access MVP
--

GLT said:
I have two columns - one is the date and the other is the time. I am
trying
to extract all records from 07:00 - 00:00.

I have put this in the query design grid
#7:00:00 AM# And >#12:00:00 AM#

When I look at the SQL, it comes out like this:

((([2 Current Schedule].[Job Start Time])>#12/30/1899 7:0:0# And ([2
Current Schedule].[Job Start Time])>#12/30/1899#));

Does anyone now what I need to put in the Grid (criteria) to just extract
times only?

Thanks,
GLT
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Order Query By TIME HELP? 4
Between on Date field? 1
Trouble with "BETWEEN #time# AND #time#" 4
SQL Query 3
Sum of time 4
Punch time query to calculate total work time 5
Date and Time 1
Need some query help 14

Back
Top