in reply to Date::Calc Module

Most databases have date manipulation functions built in. If you're using mysql for example (your database probably has different commands for this) you write your sql query as:
SELECT something FROM some_table WHERE TO_DAYS(NOW()) - TO_DAYS(date_column) = 10;
That would return all the matching rows where date_column is 10 days less that today's date. NOW give you the current date, TO_DAYS converts the date to a number of days so that you can do a subtraction. This would be significantly faster than selecting out every row and then doing the date manipulation stuff in perl.

HTH (I can provide a more complete example if you want)

/\/\averick
perl -l -e "eval pack('h*','072796e6470272f2c5f2c5166756279636b672');"

Replies are listed 'Best First'.
Re: (maverick) Re: Date::Calc Module
by skirrow (Novice) on Dec 29, 2001 at 22:55 UTC
    Hi, I'm using a flat-file text db but thanks anyway. :o) - Neil