FYI~ in case anyone is following this and needs it

Added this & all is good in my world!

<cfif daystogo LT 1>
    <strong><img src="images/ALERT.gif" width="18" height="13"> Ends
today!</strong>
    <cfelse>
    <cfoutput>#daystogo# days left</cfoutput>
</cfif>

Dave

----- Original Message -----
From: "Dave Lyons" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, February 13, 2003 11:43 PM
Subject: Re: OK, lets start over........Re: any ideas on this error?


> 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
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