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…

Advertisements

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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s





%d bloggers like this: