Is there a way to do the same thing in Access2000?

David



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 31, 2001 3:09 PM
To: CF-Talk
Subject: RE: Data-modeling for anniversaries...


I would use a series of database functions to turn the original date into a
date in the current year, like this (Oracle-ish code since I don't know what
DB you're using but am too lazy to find the exact syntax):

to_date (to_char(aniv_date_field, 'm-d') + '-' + currentyear(), 'm-d-yyyy' )

now I have a "date field" and can compare to today and today + 7 days.

-----Original Message-----
From: David Grabbe [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 31, 2001 1:31 PM
To: CF-Talk
Subject: Data-modeling for anniversaries...



I've run into a data-modeling stumper.  I have a database table which
contains wedding anniversaries and the respective couple's name.  The date
is stored as the wedding date, so calculating the anniversary is easy.  The
primary usage of this is to display the anniversaries on a monthly calendar.
However, now i need to select just the anniversaries which will be coming up
in the next week.  The problem is that since the dates are stored with the
original years (i.e. 11/28/1970), I can't just select the dates that are
between a specific date range, because the year will throw that all out of
whack.  So how can i select based just on the month/day, also taking into
account that in the middle of the "week" the month can change to the next
month (November-December)?  Any ideas?


Cheers,
David
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to