Query Help

  • Thread starter Thread starter boese.c
  • Start date Start date
B

boese.c

I have a a table in access that a column has the data :2006-03-03
00:45:09.000, it is a time stamp that just keeps changing. My question
is how would I query just on the hour. So I could query on 00:45 and
00:46.

Thanks
Chad
 
I have a a table in access that a column has the data :2006-03-03
00:45:09.000, it is a time stamp that just keeps changing. My question
is how would I query just on the hour. So I could query on 00:45 and
00:46.

Thanks
Chad

What's the datatype of this field? Is it in a native Access table or a
linked table of some sort? Access Date/Time values do not have
millisecond precision (only to the nearest second) nor do they have
colons, so I'm guessing it's Text.

Try using a calculated field:

TheHour: Hour(CDate(Mid([timestamp], 2, 19)))

Mid will extract the date/time portion; CDate will convert this to a
date/time; Hour will extract just the hour portion thereof.

John W. Vinson[MVP]
 
Back
Top