Lez, this has been asked, but not answered.  What do the zeros mean?  Do
they indicate a date range?  Does 2007.0.0 mean the entire year of 2007?
Does 2007.10.0 mean the entire month of October in 2007?  Does 0.0.0 mean
always?

If so, I'd create two date columns, begin_dt and end_dt.  I'd then write SQL
scripts to populate those columns.

On Tue, Mar 25, 2008 at 9:51 AM, Claude Schneegans <
[EMAIL PROTECTED]> wrote:

> Ok, how about this, a bit ugly, but should work on any database:
>
>  WHERE
>    (YEAR > #form.from_y#
>        OR (YEAR = #form.from_y#
>           AND (MONTH = 0
>              OR (MONTH >= #form.from_m#
>                 AND (DAY = 0 OR DAY >= #form.from_d#)))))
>    AND
>     (YEAR < #form.to_y#
>        OR (YEAR = #form.to_y#
>           AND (MONTH = 0
>              OR (MONTH <= #form.to_m#
>                 AND (DAY = 0 OR DAY <= #form.to_d#)))))
>
> --
> _______________________________________
> REUSE CODE! Use custom tags;
> See http://www.contentbox.com/claude/customtags/tagstore.cfm
> (Please send any spam to this address: [EMAIL PROTECTED])
> Thanks.
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302012
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to