Bob,


Tks a lot.


Cheers,
Mellotto.


"Bob Showalter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > -----Original Message-----
> > From: Mellotto [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, September 17, 2001 3:47 PM
> > To: [EMAIL PROTECTED]
> > Subject: Date (Localtime)
> >
> >
> > Hi Folks,
> > When I execute:
> >
> > $hora = exec('date +%y%m%d%H%M%S ');
> > print " $$hora\n ";
>
> Er, that print line isn't being executed. Good thing, because
> it's wrong. Enable warnings to catch this kind of thing.
>
>    perldoc -f exec
>
> >
> > I have the output in the following format (YYMMDDHHMMSS):
> > 010917162026
> >
> > How I could make to show the previous day?
>
> Use POSIX strftime(), localtime(), and time():
>
>    use POSIX qw(strftime);
>    $hora = strftime('%y%m%d%H%M%S', localtime(time - 86400));
>    print "$hora\n";



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to