This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > January 2006 > DateDiff - date minus Date()





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author DateDiff - date minus Date()
Wally Kolcz

2006-01-30, 10:54 pm

I have a column in my database for a due date. I want to use DateDiff to
take todays (and everydays) date and subtract it from the due date (dynamic)
to produce a whole number difference to reflect how many days left.

I used this for another date, but don't know how to modify it to capture the
Date() or Now() (Just want the date, not the time if possible)

pdays = DateDiff("d",project.Fields.Item("date").Value,
project.Fields.Item("duedate").Value)

Thanks! ASP/VB

--
Wally Kolcz
Developer / Support
ProjectProofing.com


Wally Kolcz

2006-01-30, 10:54 pm

Nevermind, figured it out. But would like to know how to make a negative
number show as a positive.. See other post

--
Wally Kolcz
Developer / Support
ProjectProofing.com
"Wally Kolcz" <wkolcz@projectproofing.com> wrote in message
news:dr97tm$d2e$1@forums.macromedia.com...
>I have a column in my database for a due date. I want to use DateDiff to
>take todays (and everydays) date and subtract it from the due date
>(dynamic) to produce a whole number difference to reflect how many days
>left.
>
> I used this for another date, but don't know how to modify it to capture
> the Date() or Now() (Just want the date, not the time if possible)
>
> pdays = DateDiff("d",project.Fields.Item("date").Value,
> project.Fields.Item("duedate").Value)
>
> Thanks! ASP/VB
>
> --
> Wally Kolcz
> Developer / Support
> ProjectProofing.com
>



Joe Makowiec

2006-01-30, 10:54 pm

On 25 Jan 2006 in macromedia.dreamweaver, Wally Kolcz wrote:

> Nevermind, figured it out. But would like to know how to make a
> negative number show as a positive.. See other post


I'm not sure what other post you're referring to, but it looks like
you're using VBScript? Try Abs()

http://www.devguru.com/Technologies...ickref/abs.html

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews