---------- Original Message ----------------------------------
From: Tony Schreiber <[EMAIL PROTECTED]>
>For a sales report, I need to figure out what the date is for this DAY
>last year. So for today, 8/5/2003 Tuesday, I need to figure out what the
>date was for this Tuesday last year (which was 8/6/2002).

I'm not sure if this is totally accurate, but couldn't you just use DateAdd to 
subtract 52 weeks?  That should keep it to the same day of the week.  Of course, there 
could be a problem where some years you'd want to subtract 53 weeks (as someone 
pointed out).

In that case, I'd subtract 52 weeks, then see if the "date" is within 5 "date"'s of 
the original date. If not, I'd subtract 1 more week.

Scott
--------------------------------
Scott Brady
http://www.scottbrady.net/
 
             
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to