Even easier, once you have the dates just check to see if now() is 

A) GTE EndDateTime OR LTE StartDateTime
B) GTE StartDateTime AND LTE EndDateTime

A being true means grant access
B being true means deny access

StartDateTime being the time on Friday that you want to close out access and
the EndDateTime being the time on Monday that you want to start granting
access again.

Of course you could just write a couple batch files (one to start the CF or
IIS service(s) and one to stop them) then just use scheduled tasks to run
them at your desired days/times.

..:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com

-----Original Message-----
From: Justin D. Scott [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 28, 2005 1:52 PM
To: CF-Talk
Subject: RE: Time Block

> Hi. I trying create a function in this format:
> IsBlockedTime(startdayofweek,starthour, startminute,
> enddayofweek, endhour,endminute)

This should be simple...  Once you have the values, create datetime objects
using createDateTime() and then use the DateDiff() function against those
and now() to determine if it is in range.  Return value as needed.


-Justin Scott





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222617
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to