You are getting a 0 for both because there's less than 24hrs difference
between then and now.

IIRC, datediff does something like count the seconds between the two
datetimes and then returns the integer part of that time divided by the
number of seconds in the span you specified (i.e. 3600 for 'h').

If that last sentence made sense at all, I'll be amazed.  But my tired brain
just can't explain it better.


--  Ben Doom
    Programmer & General Lackey
    Moonbow Software, Inc

: -----Original Message-----
: From: Smith, Matthew P -CONT(DYN) [mailto:[EMAIL PROTECTED]]
: Sent: Thursday, February 06, 2003 5:28 PM
: To: CF-Talk
: Subject: date diff help
:
:
: I need a conditional that will reveal a link starting at midnight tonight.
: My brain seems a bit fired right now, and I can't get this working.
:
: Doing this:
: #datediff( "d" , "{ts '2003-02-07 00:00:01'}" , now() )#
:
: gives me a 0
:
: but so does this:
: #datediff( "d" , "{ts '2003-02-06 00:00:00'}" , now() )#
:
: (with a 6 instead of a 7 for the day)
:
: I've also tried "y".
:
: Can anyone provide the syntax to do what I need.
:
: It'll just be in a simple cfif.
:
: Last thing for today, then I can go home, and I rather not come
: in tonight.
:
: Thanks, all.
: Matthew P. Smith
: Web Developer, Object Oriented
: Naval Education & Training Professional
: Development & Technology Center
: (NETPDTC)
: (850)452-1001 ext. 1245
: [EMAIL PROTECTED]
:
:
: 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

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

Reply via email to