great that finally seems to work!
thank you:)
the only flaw is that on the last day, the days left should read 0 but it
still says 1 day left.
I'm sure a quick cfif should fix that
once again, thanks to everyone!
Dave
----- Original Message -----
From: "Jeff Garza" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, February 13, 2003 6:05 PM
Subject: Re: OK, lets start over........Re: any ideas on this error?
> Ooops. Error in calculation. My original script used minutes and I
goofed
> on the conversion to seconds.
>
> <CFSCRIPT>
> timeleft = DateDiff("s", Now(), deadline);
> daystogo = Int(timeleft /86400);
> leftover1 = timeleft - (daystogo * 86400);
> hourstogo = Int(leftover1/3600);
> leftover2 = leftover1 - (hourstogo * 3600);
> minutestogo= Int(leftover2/60);
> leftover3 = leftover2 - (minutestogo * 60);
> secondstogo = leftover3;
> </CFSCRIPT>
>
> <CFOUTPUT>
> #daystogo# days<BR>
> #NumberFormat(hourstogo, '00')# Hours<BR>
> #NumberFormat(minutestogo, '00')# minutes<BR>
> #NumberFormat(secondstogo, '00')# seconds<BR>
> </CFOUTPUT>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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