Most databases have something equivalent to CF's dateCompare, but if
not, you can always hack it with a BETWEEN clause, using the first and
last datetimes of the year. Have to check the documentation for you
database.
cheers,
barneyb
On Tue, 17 Aug 2004 17:19:41 -0400, Les Mizzell <[EMAIL PROTECTED]> wrote:
> I've got a "smalldatetime" field in a SQL database.
>
> In a query, I need to be able to pull all records where the year of this
> field equals the year value entered in a form..
>
> Don't have too much trouble comparing dates outside of queries, but
> inside I always get something wrong...
>
> I'd love to be able to do womething like:
>
> WHERE #DateCompare(form.myDATE, databaserecord.date, yyyy)# = -1
>
> ....but that doesn't work....
>
> Pointers please?
--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

