I'm working on a Drupal 6 site that includes the ability to book resources (meeting rooms, projectors, etc). When somebody submits a new reservation/booking, I need to validate the reserved time to make sure it doesn't fall outside of business hours. I was hoping to do this with the Rules module, as I'd like the ability to change the validation criteria via the Drupal web UI.
Question is, how would I accomplish this? Looking thru my options in Rules, if I use a "Form is being validated" rule, I don't see how to get at my CCK datetime field. If I use a "Node: Content is going to be saved" rule, I can get at the field, but don't see an easy way to compare just the time in the datetime field against the allowed time interval (and presumably, this is too late in the workflow to actually validate the form, isn't it?)
I suppose I'll need to use strftime() to parse out the hour and do a little comparison in PHP - but where do I set this up in Rules? I've looked thru the docs but haven't found a suitable example. Any pointers would be appreciated.

Comments
Did you find a way for this?
Did you find a way for this? I'd need something like this as well...
No, never did...
No, I never did manage to find a way to do this with Rules. I'm going to build a custom module to do it instead.
Will you publish your module
Will you publish your module for the community? I think it would be a great contribution :-)
Probably not, since it won't
Probably not, since it won't be a complete module.
It will likely be about 10 lines of code & not very useful to you as-is. There won't be any admin interface or UI for it. It's just going to check pre-defined fields against pre-defined times. I will post the actual code here, although that's been done too (if you search for custom form validation, you'll find all kinds of examples, like this: http://drupal.org/node/456076)
Note: that example shows you how to validate on a taxonomy field ... so not quite applicable to date/time, but gives you an idea of where & what you have to modify.
Maybe in a couple months if my schedule frees up I'll try and build it into a proper module that would actually be useful to others. :)
resource_conflict
You should be able to do this with the resource_conflict module. It supports date-fields and some other stuff too. I've used it with a Drupal 5 project a few years ago. Worked pretty well.