Posted on 2007-02-05 20:55:09-08 by porkisgood in response to 4247
Re: DateCalc not getting YEAR difference in business mode
Sorry for the multiple posts.. I wish I could edit my previous post! I was using Delta_Format in "exact" mode when I needed to be using "approx".

so instead of: $total_days = Delta_Format( DateCalc($first_date, $second_date, \$err, 2), 1, "%dt");

it now reads: $total_days = Delta_Format( DateCalc($first_date, $second_date, \$err, 2), "approx",1, "%dt");

and returns a value of 43.438.

The only problem is Dec of 2006 only had 19 business days.. not 31...
Direct Responses: 4251 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.