in reply to Re: Trouble with Dates
in thread Trouble with Dates

This worked great!! thx poj

if i wanted to find previous month's last day how would i go about that..thx

Replies are listed 'Best First'.
Re^3: Trouble with Dates
by poj (Abbot) on Jul 10, 2013 at 19:15 UTC
    To get last day of previous month add -1 days to the 1st of the current month.
    #perl use strict; use Date::Calc qw( Delta_Days Today Days_in_Month Add_Delta_Days); # add Add_Delta_Days my ($y,$m,$d) = Today(); # Add_Delta_Days #($year,$month,$day) = Add_Delta_Days($year,$month,$day,$Dd); my $prev_mth_end = sprintf "%04d,%02d,%02d", Add_Delta_Days($y,$m,1,-1); print $prev_mth_end;
    All the function are documented in Date::Calc.
    poj