Dave Lyons wrote:

>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")>
>
Make that

DateDiff("'s'", "#Now()#", "deadline")

or 

DateDiff("'s'", Now(), "deadline")

Jesse



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Get the mailserver that powers this list at http://www.coolfusion.com

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

Reply via email to