The MySQL documentation on date and time formats can be found here.
In particular, take a look at DATE_ADD() and DATE_SUBTRACT(), which will return a date offset from a given date by a certain amount (i.e. 1 DAY). Thanks,
TECHy | [reply] |
I do all that kind of thing by storing my dates as the 10-digit time integer. So I don't have to learn how MySQL does dates, I save a tiny bit of space, and all my favourite perl date functions and modules have something they can get their teeth into. Plus it's very easy to add or subtract 24 * 60 *60.
There's some more on this here
§ George Sherston | [reply] [d/l] [select] |