The Intuitive Naming Awards…

I found myself needing to subtract a number of days from a date today in SQL Server. I couldn’t think what the function name was that would do this for me so I speculatively typed in DATESUBTRACT, which obviously didn’t work as there is no such function.

So, I had a shufty around the good ol’ Internet and what did I find?

The function I needed to use to subtract from a date was… yes, you guessed it…

DATEADD

I believe the American phrase ‘go figure’ would be appropriate in this instance…

1 Response to “The Intuitive Naming Awards…”


  1. 1 Samuel June 16, 2007 at 1:25 pm

    I was going to say it might be something to do with computers adding negatives rather than subtracting, but I wouldn’t think that applies when you are dealing with SQL.


Leave a Reply




a