With output that looks like:#!/usr/bin/perl use strict; use Date::Manip; my $start = Date::Manip::ParseDate('2013-10-03 00:00:00'); my $end = Date::Manip::ParseDate('2013-12-09 00:00:00'); print "$start\n"; print "$end\n"; #Standard Days my $standard_delta = Date::Manip::DateCalc($start,$end,1); print "$standard_delta\n"; my $standard_days = Date::Manip::Delta_Format($standard_delta,2,%dyd') +; print "$standard_days\n"; #Business Days my $business_delta = Date::Manip::DateCalc($start,$end,2); print "$business_delta\n"; my $business_days = Date::Manip::Delta_Format($business_delta,2,'%dyd' +); print "$business_days\n";
Note: that I am using a newer version than you state that you are, but as close as I can tell from a cursory glance through the CPAN docs, the functionality has not changed. (I may be wrong about that, but it will only take a second to copy the above and try it. If I am wrong, you waste a copy/paste ->save->run amount of time, not much more...).2013100300:00:00 2013120900:00:00 +0:2:+0:6:0:0:0 66.87375 +0:2:+0:+4:0:0:0 64.87375
Hope that is helpful... Update: Changed format directive from '%dydt' to '%dyd', thus changing the output to exclude the 't' from the end of the calculated days.
In reply to Re: DateManip Delta_Format Usage
by wjw
in thread DateManip Delta_Format Usage
by nabrown737
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |