Title: unix time conversion function
Yes I knew it was easier in perl, I prefer to distribute a single script whenever possible and I write pretty much everything in shell. However, I just figured out a trick to put the perl directly in my .ksh scripts (see the post I posted a few minutes ago) so I will likely change the way I have been doing that.  Thanks for the perl however, saved me some time looking it up!
 
See ya at the Symposium!
 
Thanks,
Ethan
-----Original Message-----
From: Cary Millsap [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 24, 2003 4:29 PM
To: Multiple recipients of list ORACLE-L
Subject: RE: unix time conversion function

At the risk of stating the obvious, doing it in Perl looks like this:

 

#!/usr/bin/perl

use Date::Format qw(time2str);

my $t = 1043447100; # for example

print time2str("%T %A %d %B %Y", $t), "\n";

 

Cary Millsap
Hotsos Enterprises, Ltd.
http://www.hotsos.com

Upcoming events:
- 2003 Hotsos Symposium on Oracle® System Performance, Feb 9-12 Dallas
- RMOUG Training Days 2003, Mar 5-6 Denver
- Hotsos Clinic 101, Mar 26-28 London

Reply via email to