had the same problem, heres the solution

if you try and run an if then statement using standard time, like this:

If now gt "5:30AM" and now lt "4:00PM then
hey we're open
else
sorry closed
/if

it doesnt work right?

what you have to do (just for the if then part) is use military time
like this just goes by hours(HH), so 5:30AM is 5, and 4:00PM is 16

<CFIF   #timeformat(time, "HH")# gt "7" and  #timeformat(time, "HH")# lt
"12">
<cfset wentthere=1>
</cfif>
</cfoutput>

<cfoutput>
<CFSET time = now()>
<CFIF #timeformat(time, "HH")# gt "12" and #timeformat(time, "HH")# lt "16">
<cfset wentthere=1>
</cfif>
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
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