Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Best way to print out a particular date-time format (very specific)

by japhy (Canon)
on Jun 08, 2006 at 20:44 UTC ( [id://554357]=note: print w/replies, xml ) Need Help??


in reply to Best way to print out a particular date-time format (very specific)

I'd use:
use POSIX 'strftime'; my $date = lc strftime("%d%b%y:%H:%M:%S", localtime); # %b returns Mm +m, not mmm

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart
  • Comment on Re: Best way to print out a particular date-time format (very specific)
  • Download Code

Replies are listed 'Best First'.
Re^2: Best way to print out a particular date-time format (very specific)
by graq (Curate) on Jun 09, 2006 at 07:13 UTC
    perl -MDate::Manip -e'print lc UnixDate("NOW","%d%b%y:%H:%M:%S")."\n"'

    :)

    EDIT: Forgot the lc

    -=( Graq )=-
      • Date::Manip is not core, POSIX is.
      • Date::Manip provides everything plus the bathroom sink, POSIX is lightweight.

      Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
      How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart
        Good to know, I need to read the docs on the POSIX mod. Thanks again!

        _________________________________________________________________________________

        I like computer programming because it's like Legos for the mind.

Re^2: Best way to print out a particular date-time format (very specific)
by OfficeLinebacker (Chaplain) on Jun 08, 2006 at 20:55 UTC
    Ka-ka click, click, booyah!

    ++japhy!

    _________________________________________________________________________________

    I like computer programming because it's like Legos for the mind.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://554357]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-18 20:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found