Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
5 posts • Page 1 of 1
I am trying to write a calculated field or UDF that will allow me to count days between two dates "but without counting weekends" any help would be apprciated. Also anyplace I can go to find udf^s or calculated fields that people share with each other ?____Thanks
I would try this approach to see if it would work.__If you divide the days between dates (a built in function) by 7 you will get the number of weeks. Each whole week has a weekend, so you can subtract two days for each whole week. Then you^ll need some iif statements to check the start day for periods less than 7 days and the end date^s day of week for the instance where there is a remainder to your division (MOD function). For example if the remainder is 1, representing one day, and the last day is Sat or Sun, you need to subtract 1 additional day.____It may take more than one function. Might not be elegant :-)__-Pat-
Go to http://www.livewarepub.com/technote.htm and look at the article __Assorted Tips and Tricks.__This page also has UDF file you can download that includes a week days between calculation.____Kathleen__R&R Support__