Re: Time Block

2005-11-01 Thread Matt Robertson
I wrote and posted cf_Blackout in the devex years ago. Feed it a time range and it blacks you out for that range. Its smart enough to cross midnight (i.e. it understands and 11pm to 6 am blackout). Here's a very slightly revised version of the posted code.

Re: Time Block

2005-10-31 Thread Roberto Perez
At 09:22 AM 10/31/2005, Justin D. Scott wrote: > Perhaps one of the fields from >the DB has an invalid value such as a null or blank string or something? If >you post the error here it may help uncover the issue. I did more "narrowing down" to see where the problem was exactly. I replaced all

Re: Time Block

2005-10-31 Thread Roberto Perez
At 09:22 AM 10/31/2005, you wrote: >The code looks fine as far as I can tell. Perhaps one of the fields from >the DB has an invalid value such as a null or blank string or something? If >you post the error here it may help uncover the issue. When I print the values on the screen, all fields ha

RE: Time Block

2005-10-31 Thread Justin D. Scott
> but that threw a nonspecified error, and the CFSET > tag would only be processed if I enclosed the portion > after the EQUAL sign within quotes (which obviously > converted it to a string). Any ideas on how to code > this part so that it works? The code looks fine as far as I can tell. Perh

RE: Time Block

2005-10-31 Thread Roberto Perez
At 11:09 PM 10/30/2005, Justin Scott wrote: >If you do it the way you're doing it, you're comparing strings, not date >objects. You should take the fields you get from the DB and use >createDateTime() to create a CF datetime object, then compare that to now() >instead of comparing strings. Thank

RE: Time Block

2005-10-30 Thread Justin D. Scott
If you do it the way you're doing it, you're comparing strings, not date objects. You should take the fields you get from the DB and use createDateTime() to create a CF datetime object, then compare that to now() instead of comparing strings. -Justin Scott > I'm trying to implement that solut

RE: Time Block

2005-10-30 Thread Roberto Perez
At 05:17 PM 10/28/2005, Bobby Hartsfield" wrote: >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 Hey, I'm trying to impleme

RE: Time Block

2005-10-28 Thread Bobby Hartsfield
. ..:.:.:.:.:.:.:.:.:.:.:.:.:.:. 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, start

RE: Time Block

2005-10-28 Thread Justin D. Scott
> 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()