Something like this should work for you.

<CFSET chktime = #DateDiff("h", TimeFormat(now()),
CreateTime(YourTimeInput))#>
<CFIF (chktime LT 2) AND (chktime GTE 1)>
<CFSET bgcolor = "yellow">
<CFELSEIF chktime EQ 2>
<CFSET bgcolor = "orange">
<CFELSEIF chktime GT 2>
<CFSET bgcolor = "red">
<CFELSE>
<CFSET bgcolor = "black">
</CFIF>
<CFOUTPUT>
<B>
<FONT FACE="Arial" COLOR="#bgcolor#">Hello your #chktime# hour(s)
late</FONT>
</B>
</CFOUTPUT>

Good Luck!

-Mark :o)

----- Original Message -----
From: Aidan Whitehall <[EMAIL PROTECTED]>
To: CF-Talk (E-mail) <[EMAIL PROTECTED]>
Sent: Thursday, September 14, 2000 7:44 AM
Subject: DateTimeDiff


> Is there DateDiff function that allows you to compare DateTime objects,
not
> just Date Objects?
>
> I need to flag a record yellow if it's an hour overdue, orange if it's two
> hours overdue and red for anything more than that.
>
>
> Thanks
>
> --
> Aidan Whitehall <[EMAIL PROTECTED]>
> Netshopper UK Ltd
> Advanced Web Solutions & Services
>
> http://www.netshopperuk.com/
> Telephone +44 (01744) 648650
> Fax +44 (01744) 648651
> --------------------------------------------------------------------------
----
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to