in reply to Date::Calc Module
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.SELECT something FROM some_table WHERE TO_DAYS(NOW()) - TO_DAYS(date_column) = 10;
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 |