my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =localtime(time);
$year += 1900; # 4 digit year
#$year = sprintf("%02d", $year % 100); #2 digit year
$mon++; # mon is 0..11
my $timestamp= sprintf
"%04d%02d%02d_%02d%02d%02d",$year,$mon,$mday,$hour,$min,$sec;
David Wright
"Lincoln, Adym"
<[EMAIL PROTECTED]> To:
<[email protected]>
Sent by: cc:
[EMAIL PROTECTED] Subject: date() function does
not work in Windoze...
eState.com
13/10/2005 09:18 PM
Hi all,
I know this has been asked, but I couldn't find anything on the web or in
ActiveState's search of the mailing list. How do you obtain a
timestamp/date in the form of YYYYMMDD-HHMISS from ActivePerl's date()
function on Windoze? The following code doesn't want to work :
chop(my $myDate = `date +%Y%m%d-%H%M%S`);
tia,
Adym Lincoln
I/S Corporate - I/S Internal Applications
603-245-8245
Ext : 58245
[EMAIL PROTECTED]
...
It's a bug planet...it's an ugly planet...ever feel like your software
project is going in the wrong direction.
...
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs