Select datediff(day, GetDate(), dateadd(month, 1, GetDate()))
Posted by Anil Shah on April 12, 2013 in SQL Interview Questions And Answer
May 14, 2013 at 6:40 pm
i will not work for every date
try for 1/31/2013 or 3/31/2013 or 5/31/2013
all these months are of 31 days but for above date result will be 28, 30 and 30
For correct answer see
May 15, 2013 at 1:56 pm
Thanks For Your Reply.
I have Seen Your Solution. And I found This is right.
I will Change my Code As Per Your Solution.
Fill in your details below or click an icon to log in:
You are commenting using your WordPress.com account. ( Log Out / Change )
You are commenting using your Twitter account. ( Log Out / Change )
You are commenting using your Facebook account. ( Log Out / Change )
You are commenting using your Google+ account. ( Log Out / Change )
Connecting to %s
Notify me of new comments via email.
Blog at WordPress.com.
Entries (RSS) and Comments (RSS)