Loading ...
Sorry, an error occurred while loading the content.

Re: DATE::MANIP number of days between two dates

Expand Messages
  • dachner2002
    Date::Calc requires a C compiler to install so I ve stayed away from it. Don
    Message 1 of 4 , Apr 15, 2009
    • 0 Attachment
      Date::Calc requires a C compiler to install so I've stayed away from it.
      Don


      --- In perl-beginner@yahoogroups.com, "buxh42a" <buxh42a@...> wrote:
      >
      > http://faq.perl.org/perlfaq4.html#How_can_I_compare_tw
      >
      > Another way:
      >
      > use Date::Calc qw(Delta_Days);
      > $days = Delta_Days( $year1, $month1, $day1, $year2, $month2, $day2);
      >
      >
      >
      > --- In perl-beginner@yahoogroups.com, "dachner2002" <dachner@> wrote:
      > >
      > > How do I get the number of days between two dates using DATE::MANIP?
      > >
      > > This is all I can come up with but it gives me Weeks and Days, not just days.
      > >
      > > +0:0:4:5:0:0:0
      > >
      > >
      > > $date1 = ParseDate("05/10/1999");
      > > $date2 = ParseDate("06/12/1999");
      > >
      > > delta = DateCalc($date1,$date2,\$err,0);
      > >
      > > Thx,
      > > Don
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.