in reply to (jeffa) Re: DBI SQL Query Question
in thread DBI SQL Query Question

Or even more similar to using date:

use POSIX qw( strftime ); # ... my $month = strftime('%m'); # same as `date '+%m'` my $day = strftime('%d'); # same as `date '+%d'`

Any date/time formatting you could get with date is possible with <CDOE>strftime()</CODE> (since under the hood, date calls it too!).

Perhaps this particular use is best accomplished with localtime, but it could be helpful to know about the concordance between date and <CDOE>POSIX::strftime()</CODE>.

dmm

If you GIVE a man a fish you feed him for a day
But,
TEACH him to fish and you feed him for a lifetime