develooper Front page | perl.beginners | Postings from May 2008

Date::Manip

Thread Next
From:
reader
Date:
May 12, 2008 17:00
Subject:
Date::Manip
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?


Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About