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
 
Back
Top