in reply to Re: How to subtract date by 1 day
in thread How to subtract date by 1 day

That's fine until you get to the first day of the month:
$ perl -l use strict; use warnings; my $db_name="2007_12_01_04_49_15"; my @date=split /_/,$db_name; $date[2]=$date[2]-1; $db_name=join '_',@date; print $db_name; __END__ 2007_12_0_04_49_15
Date and time calculations (e.g. month changes, leap years, timezones) are surprisingly difficult to get right. Don't reinvent the wheel. Use an existing module from .
--
Andreas