Date Calculation
Date Calculation
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
=> RE: Date Calculation
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-
==> RE: Date Calculation
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__
==> RE: Date Calculation
Thanks,__I did just that and using those UDF^s I was able to do exactly what I was trying to do. ____Thanks again !!!!
===> RE: Date Calculation
Thanks, that helped.