Hi Dave, Yes, you are absolutely correct, however, Netezza does not have its own "procedural" language so I am unable to use a cursor to handle date comparison between difference rows. In addition I needed to write the output to a table.
Peter -----Original Message----- From: Dave Rolsky [mailto:[EMAIL PROTECTED] Sent: Friday, September 08, 2006 9:40 AM To: datetime Subject: RE: Getting number of days between two dates using DateTime.pm On Fri, 8 Sep 2006, Loo, Peter # PHX wrote: > I tried using DateTime.pm, however, it was costing me about 11 seconds > for every 5,000 rows so I ended up using Time::Local and the localtime > that came with Perl. Here is my sample code: If by rows your mean from a DBMS, you'd probably get the best performance by doing your date math in the DBMS itself, as part of the SELECT. Actually, a good general rule is that doing things in the DBMS is going to be faster than doing it in Perl. -dave /*=================================================== VegGuide.Org www.BookIRead.com Your guide to all that's veg. My book blog ===================================================*/ This E-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply E-mail, and destroy all copies of the original message.