I don't quite see the problem. The code that converts +1 month into SQL knows that it is producing SQL at that point, so you can set it up to either produce SQL or produce a quoted date string. What am I missing? You need to post some actual code for your real problem to become obvious.