>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').
Thanks, Ben, good info. It seems a little counterintuitive, but I guess it makes sense as many other languages take seconds or milliseconds for timeouts and the like. >If that last sentence made sense at all, I'll be amazed. But my tired brain just can't explain it better. Oh, I understand. I read through the docs and the WACK on this a couple of times, and my mind just wouldn't see what I was reading. Long week. Thanks again for the help. Matt -----Original Message----- From: Ben Doom [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 06, 2003 4:53 PM To: CF-Talk Subject: RE: date diff help 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 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4