Re: DatePart

From: mountain man <hobbit_at_southern_seaweed.com.op>
Date: Tue, 17 Feb 2004 21:23:54 GMT
Message-ID: <KDvYb.64027$Wa.10244_at_news-server.bigpond.net.au>


"Portroe" <fb_at_oooi.com> wrote in message news:c0t8lf$k6h$05$1_at_news.t-online.com...

> I am currently struggling with the use of the DatePart() function,
> for instance if I have a check in and check out date in my hotel
> datebase, how can I find all bookings I have for may,

select count(*)
from bookings b
where datepart(mm, b.bookingdate)=5

> A pointer to an online tutorial would be appreciated,

There is info in the Query Analyser Help file, part of the SQL Books OnLine.

Pete Brown
Falls Creek
Oz Received on Tue Feb 17 2004 - 22:23:54 CET

Original text of this message