develooper Front page | perl.beginners | Postings from March 2002

Stumped on Date capture

Thread Next
From:
patrick.kenneally
Date:
March 6, 2002 04:17
Subject:
Stumped on Date capture
Message ID:
H00000a50a0e1a6a@MHS
Being very dense about this but I cant capture the Date output to a scalar - 
the output is: 20 days ago, it was 020214

I want the 020214 in a variable.

Thanks,
PK

	************************************************************
#!c:/perl/perl.exe 

use Strict;
use Date::Calc qw( Add_Delta_Days Today );

($year, $month, $day) = Add_Delta_Days (Today, -20);

 printf "20 days ago, it was %02d%02d%d\n", $year % 100, $month, $day;


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About