qsl has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: Date format in *nix box
by Corion (Patriarch) on Jun 28, 2006 at 07:18 UTC

    The POSIX module contains the strftime() function, which is incredibly convenient for formatting dates and times:

    use strict; use POSIX qw(strftime); print strftime '%Y%%m%d %H%M%S', localtime();
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Date format in *nix box
by shmem (Chancellor) on Jun 28, 2006 at 07:34 UTC
    You should ask such not in any way perl related questions in the chatterbox, an not make an issue of them. Please read the PerlMonks FAQ. Thanks.
    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
Re: Date format in *nix box
by borisz (Canon) on Jun 28, 2006 at 07:19 UTC
Re: Date format in *nix box
by madtoperl (Hermit) on Jun 28, 2006 at 07:17 UTC
    Hi qsl,

    This you can find from the man page itself.okey,see the command '+DATE %y%m%d %H%M%S'.This will give your expected output.
    Ouptut:-
    DATE 060628 124443

    Thanks and Regards,
    madtoperl.