Re: More elegant solution for a date conversion

2005-01-22 Thread Todd W
"Scott R. Godin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Todd W wrote: > > "Jason Balicki" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > >>Hi, > >> > >>I've got a phone record that keeps the date and time > >>in the following format: > >> > >>

RE: More elegant solution for a date conversion

2005-01-21 Thread Charles K. Clarkson
Jason Balicki <[EMAIL PROTECTED]> wrote: : Charles K. Clarkson wrote: : : $retdate should NOT be in quotes. : : What are the consequences of putting it in quotes? perlfaq4: What's wrong with always quoting "$vars"? : Every place I print in the rest of the script

RE: More elegant solution for a date conversion

2005-01-21 Thread Jason Balicki
Charles K. Clarkson wrote: [snip] > > You have $locdate scoped to the sub and all the other scoped > outside the sub. That's the "my" bit, right? Filed. Thanks. > You are also printing the new date into the log > instead of just returning the new date which is im

RE: More elegant solution for a date conversion

2005-01-21 Thread Charles K. Clarkson
Jason Balicki <[EMAIL PROTECTED]> wrote: : I've got a phone record that keeps the date and time in the : following format: : : YYMMDDHHMM : example: 0501201500 : : So, I've written the following to convert it to the format: : : MM/DD/,HH:MM : example: 01/20/2005,15:00

Re: More elegant solution for a date conversion

2005-01-21 Thread Scott R. Godin
Todd W wrote: "Jason Balicki" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi, I've got a phone record that keeps the date and time in the following format: YYMMDDHHMM example: 0501201500 So, I've written the following to convert it to the format: MM/DD/,HH:MM

Re: More elegant solution for a date conversion

2005-01-21 Thread Todd W
"Jason Balicki" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I've got a phone record that keeps the date and time > in the following format: > > YYMMDDHHMM > example: 0501201500 > > So, I've written the following to convert it to the > format: > > MM/D

Re: More elegant solution for a date conversion

2005-01-20 Thread Mark Cohen
;[EMAIL PROTECTED]> To: "'Perl Beginners List'" Sent: Friday, January 21, 2005 1:04 AM Subject: More elegant solution for a date conversion > Hi, > > I've got a phone record that keeps the date and time > in the following format: > >

Re: More elegant solution for a date conversion

2005-01-20 Thread John W. Krahn
Jason Balicki wrote: Hi, Hello, I've got a phone record that keeps the date and time in the following format: YYMMDDHHMM example: 0501201500 So, I've written the following to convert it to the format: MM/DD/,HH:MM example: 01/20/2005,15:00 sub convertdate { my($loc

Re: More elegant solution for a date conversion

2005-01-20 Thread Owen Cook
On Thu, 20 Jan 2005, Jason Balicki wrote: > > I've got a phone record that keeps the date and time > in the following format: > > YYMMDDHHMM > example: 0501201500 > > So, I've written the following to convert it to the > format: > > MM/DD/,HH:MM > example: 01/20/200

Re: More elegant solution for a date conversion

2005-01-20 Thread Randy W. Sims
Jason Balicki wrote: Hi, I've got a phone record that keeps the date and time in the following format: YYMMDDHHMM example: 0501201500 So, I've written the following to convert it to the format: MM/DD/,HH:MM example: 01/20/2005,15:00 You can use one of the Date modules that

More elegant solution for a date conversion

2005-01-20 Thread Jason Balicki
Hi, I've got a phone record that keeps the date and time in the following format: YYMMDDHHMM example: 0501201500 So, I've written the following to convert it to the format: MM/DD/,HH:MM example: 01/20/2005,15:00 sub convertdate { my($locdate)[EMAIL PROTECTED]