<!--- get the time in whole number, 24-hour (military time) --->
<cfset timeTest = val(timeFormat(now(), "HHmm")) />
<!--- run the tests --->
<cfif (timeTest lt 800) or (timeTest gte 1200 and timeTest lt 1400) or 
(timeTest gt 1700)>
<img src="imageToShow.jpg" />
</cfif>

----------------------------------------
From: "Ian Vaughan" <i.vaug...@neath-porttalbot.gov.uk>
Sent: Tuesday, June 16, 2009 9:12 AM
To: "cf-talk" <cf-talk@houseoffusion.com>
Subject: Limiting the display of an image to certain times of the day with 
CF? 

Hi

In Coldfusion can you restrict the display of a certain image for only
certain times of the day?  

For example only display the image before 8pm 12pm-2pm and after 5pm on
the site homepage

If so any ideas on the best way to achieve this?

TIA



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323529
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to