Title: date() function does not work in Windoze...
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 MMDD-HHMISS from ActivePerl's date() function on Windoze? The
From: Lincoln, Adym [mailto:[EMAIL PROTECTED]
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 MMDD-HHMISS from ActivePerl's
date() function on Windoze?
The
Adym == Lincoln, Adym [EMAIL PROTECTED] writes:
Adym How do you obtain a timestamp/date in the form of
Adym MMDD-HHMISS from ActivePerl's date() function on
Adym Windoze?
I wasn't aware there even _was_ a function called date.
Here's what I'd do:
use POSIX;
$myDate =
Hi Adym -
At 2005-10-13, 09:18:13 you wrote:
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 MMDD-HHMISS from ActivePerl's date()
function on Windoze? The
Lincoln, Adym wrote:
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 MMDD-HHMISS from ActivePerl's date()
function on Windoze? The following code doesn't want to
[EMAIL PROTECTED] wrote on 10/13/2005 02:18:13 PM:
How do you obtain a
timestamp/date in the form of MMDD-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`);
The backticks are an escape to execute
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