|
Posted by Eric J. Holtman on 01/13/06 00:33
"Andrew Chalk" <achalk@magnacartasoftware.com> wrote in
news:Pgyxf.629$PL5.489@newssvr11.news.prodigy.com:
> I have the time of an event stored on each record as a datetime
> field.It includes the year,month,day, etc. Suppose my user wants to
> search the table for all events over the lunch hour, say between11am
> and 1pm. How do I construct the SELECT query to peek into each
> datetime field and return only those records that satify the specified
> time range?
>
> Many thanks.
>
>
Scary. Really scary.
select * from Events
where datpart(hh,evt_time) between 11 and 13
Navigation:
[Reply to this message]
|