<CFIF (TimeFormat(now(), "HH:MM:SS:tt") GT TimeFormat(CreateTime(06,00,00),
"HH:MM:SS:tt")
   AND TimeFormat(now(), "HH:MM:SS:tt") LT TimeFormat(CreateTime(11,00,00),
"HH:MM:SS:tt"))
   OR (TimeFormat(now(), "HH:MM:SS:tt") GT TimeFormat(CreateTime(12,00,00),
"HH:MM:SS:tt")
   AND TimeFormat(now(), "HH:MM:SS:tt") LT TimeFormat(CreateTime(18,00,00),
"HH:MM:SS:tt"))>

 <CFSET this = 0>

<CFELSE>

 <CFSET this = 1>

</CFIF>


<CFIF this EQ 0>
 open
<CFELSE>
 closed
</CFIF>



----- Original Message -----
From: "Chris Farrugia" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 27, 2000 3:04 PM
Subject: RE: Oh man i need help


> I believe Time is a reserved word in Cold Fusion and so it can not be used
> as a variable name.  I could be wrong (and probably am).  :)
>
>
>
>
> -----Original Message-----
> From: Gavin Myers [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 27, 2000 5:07 PM
> To: '[EMAIL PROTECTED]'
> Subject: Oh man i need help
>
>
> Hah, working on this thing, using cf server 4.0 what am i doing wrong?
I've
> looked at this like 400,000 times...
> here's the simplified version (I cut out all the stuff that has no
realtion
> to the problem):
>
> <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?
>
> Its the last part of a huge project and I'm going to get hung if it doesnt
> work.
>
>
> Thanks,
> Gavin
> --------------------------------------------------------------------------
--
> --
> 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.
>

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