I'm struggling to write a tag that will give me the number of business hours
between two specified date/time fields. What I want is something like this:

<cf_businesshours   bh_start = #starttime#   bh_end = #endtime# >

which will give me the total hours, not including weekends, bank holidays
(which are supplied as a list variable #application.holidays#) and non-work
hours (e.g. 6pm to 9am - again supplied as application variables #workstart#
and #workfinish#). 

e.g. if #starttime# was friday june 10th 15.00 and #endtime# was monday june
13th 10.00 #businesshours# would be 4.

The tag is for an extranet application where we need to check whether or not
users have performed a specific task within x working hours of accepting it.
In most cases it will run as a scheduled query and bh_end will equal
#now()#.

I can work it on in terms of days (using the DateDiff function) but it's
tricky to find out which hours fall on which days. Has anyone written
something like this? Or do you have any suggestions on how I should go about
it?

Please copy any responses me as well as to the list (I'm subscribed to the
archived version).

Thanks very much

Tom

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to