Well, another problem is that you weren't using valid time object.

If you use "5:30AM", CF will think that's a text string.

If you use the proper format: "5:30 AM", it will work fine.

I tested my code before I sent it to the list, and if you follow the code exactly, it 
will work fine.

---mark

--------------------------------------------------------------
Mark Warrick
Phone: (714) 547-5386
Efax.com Fax: (801) 730-7289
Personal Email: [EMAIL PROTECTED]
Personal URL: http://www.warrick.net 
Business Email: [EMAIL PROTECTED]
Business URL: http://www.fusioneers.com
ICQ: 346566
--------------------------------------------------------------


> -----Original Message-----
> From: Gavin Myers [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 25, 2000 12:13 PM
> To: CF-Talk
> Cc: '[EMAIL PROTECTED]'
> Subject: re: time
> 
> 
> 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.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebarRsts&bodyRsts/cf_talk or send a message 
to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to