in reply to Re: Getting a date/time in a certain format in a Windows and Linux environment
in thread Getting a date/time in a certain format in a Windows and Linux environment

A word of caution: those won't necessarily give you mm/dd/yyyy. You'll need to use sprintf or printf to make sure you get 2 digits in the month and day. Similar considerations for the time portion:

my $formatted_time = sprintf "%02d/%02d/%04d %02d:%02d:%02d", $time[4] + 1, $time[3], $time[5] + 1900, $time[2], $time[1], $time[0];

Replies are listed 'Best First'.
Re^3: Getting a date/time in a certain format in a Windows and Linux environment
by Grygonos (Chaplain) on Aug 17, 2004 at 12:54 UTC

    excellent point. I need to brush up on my use of sprintf