Re: Date problem

2004-04-26 Thread Alok Bhatt
Hi, Thanks everyone for the answer. So silly of me. Didnt check the docs :$ --- Patrick Heffernan <[EMAIL PROTECTED]> wrote: > > On Mon, 26 Apr 2004 06:07:03 -0700 (PDT) > Alok Bhatt hammered out: > > > I am facing this strange problem related to dates. > > When I print the date using the

Re: Date problem

2004-04-26 Thread Patrick Heffernan
On Mon, 26 Apr 2004 06:07:03 -0700 (PDT) Alok Bhatt hammered out: > I am facing this strange problem related to dates. > When I print the date using the system's date command, > it prints correctly. But when I do the same using > localtime, it shows the month as wrong (1 month > previous. > >

Re: Date problem

2004-04-26 Thread John W . Krahn
On Monday 26 April 2004 06:07, Alok Bhatt wrote: > > Hi All, Hello, > I am facing this strange problem related to dates. > When I print the date using the system's date command, > it prints correctly. But when I do the same using > localtime, it shows the month as wrong (1 month > previous. > >

Re: Date problem

2004-04-26 Thread Beau E. Cox
On Monday 26 April 2004 03:07 am, Alok Bhatt wrote: > Hi All, > > I am facing this strange problem related to dates. > When I print the date using the system's date command, > it prints correctly. But when I do the same using > localtime, it shows the month as wrong (1 month > previous. > > bash-2

Re: Date problem

2001-07-26 Thread Stephen P. Potter
Lightning flashed, thunder crashed and [EMAIL PROTECTED] (F.H) whispered: | Hi, | does anyone know how to convert a date from mmddyy to mmdd? | so 010201 becomes 01022001 I've seen a couple of people respond to you using all sorts of date manipulation routines. Even I had a hard time followi

Re: Date problem

2001-07-25 Thread Jim Conner
Use the POSIX function strftime: #!/usr/local/bin/perl -w use POSIX; print "The date is : ",POSIX::strftime("%m%d%Y",localtime()),"\n"; -- snip -- [notjames@concon notjames]$ perl -MPOSIX -e ' > print "The date is : ",POSIX::strftime("%m%d%Y",localtime()),"\n"; > ' The date is : 07252001 -

RE: Date problem

2001-07-25 Thread Wagner-David
Here is a shot taking in mmddyy and giving mmdd: Code starts on next line(Lines with #Use are what is needed): #!perl -w use Time::Local;#Use my $Dates = '010201'; my @DateUse = (); while ( $Dates =~ /(\d{2}){1}/g ) { printf "%-s\n",$1; push(@Dat

Re: Date problem

2001-07-25 Thread John Fox
F., In article <[EMAIL PROTECTED] (F.H)>, F.H wrote: >does anyone know how to convert a date from mmddyy to mmdd? >so 010201 becomes 01022001 Sure thing! begin demo code #!/usr/bin/perl -w # Obtain month, month day, and year values from localtime() ($mon, $mday, $year) = (localtime(ti