"R.Smith" wrote... > Adapted to allow variable hours: > > Assuming you have in your code a variable set for the hours, let's assume > some PHP and call it $hrs: > > SELECT (CASE > WHEN datetime( 'now', '+".$hrs."' hours', 'localtime') <= (date( > 'now', 'localtime')||' 17:00:00') THEN datetime( 'now', '+".$hrs."' > hours', 'localtime') > ELSE datetime( 'now', '+".$hrs." hours', '+15.5 hours', 'localtime') > END ) > > Now take note, you've said in a previous mail that it can be ANY amount of > hours... the methods we have mentioned so far will break very badly if you > give more hours than today and tomorrow can accommodate.. such as '+35 > hours', because we are only skipping one day's hours, not 2 or more. > > If you really need to accommodate more than 2 work-days worth of hours, we > need to adjust that query a lot - let us know.
There will be entries longer than 1 day, so I will have to address than. Thanks for the help, but this is great, though. If I need more help, I will come back, but I have enough, and I "I think" I can figure out those longer hours then one or more days. Thanks. jos?