To get the current time under Perl, you'd do: $time = time; This is an integer (number of seconds since the Win32 time epoch).
Then to do it yourself you can do: @time = localtime $time; $timedate = sprintf '%04d-%02d-%02d %02d:%02d:%02d', $time[5]+1900, $time[4]+1, @time[3,2,1,0]; print $timedate; # I just got 2002-01-31 13:07:54 But to do it better, just use unstall the TimeDate module and use the time2str() method in Date::Format (part of the TimeDate module). -- Mike Arms -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 12:39 PM To: [EMAIL PROTECTED] Subject: Windoze...Date and Time... Hey everyone, Anyone know what the function(s) are to get date and time from a Win32 install of ActivePerl? My unix code seems too be breaking on... $strStartTime = `date +%m-%d-%Y %H:%M:%S`; Thx in advance... Adym Lincoln Edgewater Technology, Inc. Phone: (603) 644-2445, 7261 Fax: (603) 669-8330 Remember, Amateurs built the Ark, Professionals built the Titanic... _______________________________________________ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/listinfo/activeperl
