Yes, I know why... see below...
<SNIP>
<cfoutput>
<Cfset wentthere=0>
<cfset time = now()>
<CFIF #timeformat(time, "hh:mm:tt")# gt "07:59:AM" and #timeformat(time,
"hh:mm:tt")# lt "12:01:AM">
<cfset wentthere=1>
</cfif>
</cfoutput>
<cfoutput>
<CFSET time = now()>
<CFIF #timeformat(time, "hh:mm:tt")# gt "12:59:PM" and #timeformat(time,
"hh:mm:tt")# lt "06:00:PM">
<cfset wentthere=1>
</cfif>
</cfoutput>
<cfif wentthere eq 0>
<cfoutput>
#timeformat(time, "hh:mm:tt")#<br>
Sorry, we're closed
</cfoutput>
<cfelse>
<cfoutput>
#timeformat(time, "hh:mm:tt")#<br>
Hey spiffy, we're open
</cfoutput>
</cfif>
ANY possible hint as to why this does not work properly? Why it says I'm
closed when it should be open?
</SNIP>
The reason it does not work is in your <CFIF #timeformat(time, "hh:mm:tt")# gt
"07:59:AM" and #timeformat(time,"hh:mm:tt")# lt "12:01:AM"> statement. You are
saying if the time is greater than 7:59 am and less than 12:01 am. Well, 12:01 am is
one minute after midnight. Change that to say <CFIF #timeformat(time, "hh:mm:tt")#
gt "07:59:AM" and #timeformat(time,"hh:mm:tt")# lt "12:01:PM"> and it should work
just fine.
HTH,
Chris Ivey
MTS Systems Engineer
GTE Data Services: Temple Terrace, Florida
TSS Distributed - WAN Tools Group
Office: (813) 978-4844
Pager: (813) 303-1177
AIM: IveyAtGTEDS
------------------------------------------------------------------------------
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.