Thanks Ben...

What i was going to do was create seperate day, month and year fields (hear me
out).

My app gives the user the option of selecting:

a day + a month + a year OR
a day + a month + ALL years
(to get re-occuring events for a given day/month).

(think 3 drop boxes)

Now, using your method, is it possible to do this comparison in SQL?

Your method looks much neater, it's just that i can't see it working for my app.
I'd rather not have to pull all records into a query (over 2000 records) and us
CF logic to "hide" matches that dont meet the users criteria.
_______________________
James Silva
Web Production
Gruden Pty Ltd

Tel:   +61 02 9956 6388
Fax:   +61 02 9956 8433
Email: [EMAIL PROTECTED]
Web:   www.gruden.com
_______________________

>
> Hi James,
>
> A quick thought - a VB trick is to convert to float and store this. VB uses
> double precision floating point to represent dates  0 = 12/30/1899 00:00:00
>
> You could use ColdFusion's DateDiff() to count units between a base date and
> the date you need to store. If you needed accuracy to a day, you could use
> something like:
>
> DatetoStore = CreateDate("1375","8","13");
>
> BaseDate = CreateDate("1900","1","1");
> DaysDiff = DateDiff("d",BaseDate,DatetoStore);
>
> and store DaysDiff in the database. Then it's an easy task to rebuild the
> date,
>
> RebuiltDate = DateAdd("d",DaysDiff,BaseDate);
>
> Just an idea,
>
> Ben


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to