October 23, 2013 at 11:39 pm
Comments posted to this topic are about the item Date Functions
October 23, 2013 at 11:40 pm
Nice question - thanks
Hope this helps...
Ford Fairlane
Rock and Roll Detective
October 24, 2013 at 12:09 am
Nice, easy one. I'm surprised this function hadn't come up in a question before now.
October 24, 2013 at 12:37 am
Ford Fairlane (10/23/2013)
Nice question - thanks
October 24, 2013 at 12:50 am
Great QOTD. Why ? because i've yet to work on SQL 2012 and these sorts of questions help me getting familiar with new useful functionalities. Keep it up John. 🙂
October 24, 2013 at 12:54 am
I spotted at least 3 correct answers 😀
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
October 24, 2013 at 12:59 am
Till now "Ask a co-worker?" is 0%.
I am really surprised!
😛
October 24, 2013 at 1:43 am
Good one Koen and Carlo... 🙂
October 24, 2013 at 2:00 am
Nice built-in function.
October 24, 2013 at 2:34 am
Didn't know this was in SQL, had only seen it in Excel, may be useful (we might upgrade to 2012 in 2021 or so!). I've always used 'Take the first day of next month and subtract a day' before.
October 24, 2013 at 2:56 am
This was removed by the editor as SPAM
October 24, 2013 at 4:25 am
The option "Ask a co-worker?" was excellent....:-)
Nice question....
October 24, 2013 at 4:42 am
Nice one...
October 24, 2013 at 5:02 am
I was hunting for the option which said
Recite the rhyme:
30 days hath September,
April, June and November,
All the rest have 31,
Excepting February alone.
Which has but 28 days clear
And 29 in each leap year
to yourself
but then decided that particular choice was common across all releases of SQL Server.
So I went with the 2012-specific one.
October 24, 2013 at 6:09 am
For me, a better answer is to subtract one from the first day of the next month, as this method will allow the same code to be run on other versions of SQLServer. The EOMONTH function is of no use if you are writing a system that has to run on SQL2008 as well.
Viewing 15 posts - 1 through 15 (of 35 total)
You must be logged in to reply to this topic. Login to reply