Home  |  Linux  | Mysql  | PHP  | XML
From:Rob Dixon Date:Mon May 12 18:09:53 2008
Subject:Re: Date::Manip
reader@newsguy.com wrote:
> Can soneone show me how to convert unix time to something else using
> Date:: Manip?
> 
> AFter looking at the Docs in perldoc Date::Manip I thought maybe (from
> the examples)  something like script below would work.  The first two
> (now commented) worked as expected but the one with unix date produces
> a blank line only:
> 
>   #!/usr/local/bin/perl
>   
>   use strict;
>   use warnings;
>   use Date::Manip;
>   
>   my $date;
>   # print $date = ParseDate("05/12/08") . "\n";
>   # print $date = ParseDate("today") . "\n";
>   print $date = ParseDate("1210628919") . "\n";
> 
> What is the right syntax?

  print $date = ParseDate("epoch 1210628919") . "\n";

Rob
Navigate in group perl.beginners at sever nntp.perl.org
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by PHP Developer
Powered By PHP Consultants