Question
Compound condition with cfif
I am creating a page for ambulance patient off-load times
(USOL). The time is measured in seconds and I want to present it as
either mm:ss or hh:mm:ss depending on whether it takes more than an
hour or less. So my logic is:
if less than 1 second then - (nothing)
If >=1 and < 3600 seconds then format as mm:ss
if >3600 seconds then format as hh:mm:ss
My code snippet is:
<td>
<cfif USOL lt 1> -
<cfelseif USOL gte 1 AND USOL lt 3600> #timeformat((USOL/86400),"mm:ss")#
<cfelse USOL gte 3600> #timeformat((USOL/86400),"hh:mm:ss")#
</cfif>
</td>
Coldfusion 8 chokes on this. Is my syntax wrong? Is there a better way of doing this?
if less than 1 second then - (nothing)
If >=1 and < 3600 seconds then format as mm:ss
if >3600 seconds then format as hh:mm:ss
My code snippet is:
<td>
<cfif USOL lt 1> -
<cfelseif USOL gte 1 AND USOL lt 3600> #timeformat((USOL/86400),"mm:ss")#
<cfelse USOL gte 3600> #timeformat((USOL/86400),"hh:mm:ss")#
</cfif>
</td>
Coldfusion 8 chokes on this. Is my syntax wrong? Is there a better way of doing this?