> I thought I might have gotten it to work, but I was incorrect.
>
> There are 5 cases in table. Today is August 2nd. I dated 4
> cases with dates of 8/4/2002 to simulate 2 days from due date.
> 1 case is dated 7/31/2002 to simulate over due.
>
> The results I am getting are as follows:
>
> 1 cases are overdue. CORRECT
> 2002-07-31 00:00:00
>
> 1 cases 2 days from due date. HUH???
> 2002-07-31 00:00:00
>
> 4 cases 2 days from due date. CORRECT
> 2002-08-04 00:00:00
Here's what I THINK the problem is;
With DateDiff(), it's working in complete blocks of the DatePart, so if
you choose "d", it's working in whole days
With Now(), it's returning the date and time, not just the date, so you
have to trim off the time part
Try DateDiff("d", DateFormat(Now(),"d mmm yyyy"), due_date)
See if that works
Also, remember that it's the difference in days, so since today is Aug
3, Aug 1 is 2 days different, so;
DateDiff("d", Now(), CreateDate(2000,8,1)) = -2 (it was 2 days ago)
Philip Arnold
Technical Director
Certified ColdFusion Developer
ASP Multimedia Limited
Switchboard: +44 (0)20 8680 8099
Fax: +44 (0)20 8686 7911
www.aspmedia.co.uk
www.aspevents.net
An ISO9001 registered company.
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists