That's the number of seconds different between the two date/time objects. You'll want to break that down into days, hours, etc.
Integer division (\) and MOD will be your friend here. > -----Original Message----- > From: Dave Lyons [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 13, 2003 5:23 PM > To: CF-Talk > Subject: Re: OK, lets start over........Re: any ideas on this error? > > > ok, that may work > solves the error and returns this: 159679 > so should i just format that? to show the time left? > > > Dave > > ----- Original Message ----- > From: <"Everett>; <Al <[EMAIL PROTECTED]>> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Thursday, February 13, 2003 5:17 PM > Subject: RE: OK, lets start over........Re: any ideas on this error? > > > > Try this: <cfset timeLeft = DateDiff("s", Now(), deadline)> > > > > > -----Original Message----- > > > From: Dave Lyons [mailto:[EMAIL PROTECTED]] > > > Sent: Thursday, February 13, 2003 5:00 PM > > > To: CF-Talk > > > Subject: OK, lets start over........Re: any ideas on this error? > > > > > > > > > heres what i need > > > > > > i have to make this small auction page for my competitors client. > > > what i need right now is to be able to show on the details > > > page how much > > > time is left before the end of the auction. > > > see: > http://www.real-singles.com/auctionCFM/detail.cfm?auctionID=25 > > > > > > ok, so in my application.cfm template i have this variable set: > > > <cfset deadline = createDateTime(2003, 2, 15, 13, 42, 0)> > > > > > > the reason for this is that i need this to manually set the > > > end time of the > > > auction on all of the pages. > > > they arent paying enough to make it dynamic and they want > > > each auction to > > > start and end all at the same time, just a 1 shot deal. > > > but I figure i should use this for what i need now. > > > > > > so on the details page i need to basically show how much time > > > is left, just > > > like Ebay:) > > > > > > thats where dateDiff comes in, correct? > > > > > > which should be like such > > > <cfset timeLeft = DateDiff("datepart", "date1", "date2")> > > > > > > so i was thinking that Now() should go where "date1" is > > > And "deadline" from the application.cfm should go where "date2" is > > > tony i think you may be right in putting 's' in where > "datePart" is > > > > > > which now looks like > > > > > > <cfset timeLeft = DateDiff("'s'", "Now()", "deadline")> > > > > > > and that produces this error > > > > > > Parameter validation error for function DATEDIFF. > > > The value of the parameter 2, which is currently > > > "Now()", must be a > > > class java.util.Date value. > > > > > > The error occurred in > > > C:\Inetpub\wwwroot\auctionCFM\datediff.cfm: line > > > 14 > > > > > > 12 : > > > 13 : <body> > > > 14 : <cfset timeLeft = DateDiff("'s'", "Now()", "deadline")> > > > 15 : > > > 16 : > > > > > > > > > > > > > > > > > > > > > > > > > > > Dave > > > > > > ----- Original Message ----- > > > From: "Tony Weeg" <[EMAIL PROTECTED]> > > > To: "CF-Talk" <[EMAIL PROTECTED]> > > > Sent: Thursday, February 13, 2003 4:40 PM > > > Subject: RE: any ideas on this error? > > > > > > > > > > send the code ur using.... > > > > > > > > ...tony > > > > > > > > Tony Weeg > > > > Senior Web Developer > > > > UnCertified Advanced ColdFusion Developer > > > > Information System Design > > > > Navtrak, Inc. > > > > Mobile workforce monitoring, mapping & reporting > > > > www.navtrak.net > > > > 410.548.2337 > > > > > > > > -----Original Message----- > > > > From: Dave Lyons [mailto:[EMAIL PROTECTED]] > > > > Sent: Thursday, February 13, 2003 4:36 PM > > > > To: CF-Talk > > > > Subject: Re: any ideas on this error? > > > > > > > > > > > > using just Now() throws the same error > > > > > > > > > > > > Dave > > > > > > > > ----- Original Message ----- > > > > From: "Tony Weeg" <[EMAIL PROTECTED]> > > > > To: "CF-Talk" <[EMAIL PROTECTED]> > > > > Sent: Thursday, February 13, 2003 4:30 PM > > > > Subject: RE: any ideas on this error? > > > > > > > > > > > > > why use all that....can u just use > > > > > > > > > > Now() > > > > > > > > > > ...tony > > > > > > > > > > Tony Weeg > > > > > Senior Web Developer > > > > > UnCertified Advanced ColdFusion Developer > > > > > Information System Design > > > > > Navtrak, Inc. > > > > > Mobile workforce monitoring, mapping & reporting > > > > > www.navtrak.net > > > > > 410.548.2337 > > > > > > > > > > -----Original Message----- > > > > > From: Dave Lyons [mailto:[EMAIL PROTECTED]] > > > > > Sent: Thursday, February 13, 2003 4:26 PM > > > > > To: CF-Talk > > > > > Subject: any ideas on this error? > > > > > > > > > > > > > > > Parameter validation error for function DATEDIFF. > > > > > The value of the parameter 2, which is currently > > > > > "CreateDateTime(Now())", must be a class java.util.Date value. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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

