After I have seen a lot of questions here using the DATE_SUB()
or DATE_ADD()
functions instead of the arithmetic operators +
or -
For me, it is a matter of experience. After dealing with multiple editors, libraries, and tools that manipulate databases, I've learned not to trust the "+" and "-" operators as much as I trust DATE_SUB(). It's a lot less likely that something is going to be accidentally broken as part of the next software upgrade with DATE_SUB(), when compared to using +/-