in reply to Date subtraction (intervals) w/Class::DBI
I agree with the person who said you should use MySQL's builtin functions. But if you can't use NOW() for some reason (I'd like to know why), it might be safe to assume you can't use the other functions.
I use Date::Manip for a lot of stuff. While it is big it can do almost everything. I suspect it will work fine in this case.
Another option would be to take out the day of the month and substract 5 from it. check to make sure it is still valid and the substitute that into your date. Handling the invalid range will be fun.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Date subtraction (intervals) w/Class::DBI
by saberworks (Curate) on Oct 16, 2004 at 00:23 UTC |