New Date Function Of Sql Server 2012

you can add months also using this function by passing duration in second parameter.



DECLARE @Currentdate DATETIME
2.SET @Currentdate = '12/12/2010'
3.SELECT EOMONTH ( @Currentdate,-2 ) AS Result;
4. 
5./*Result
6.2010-10-31 */

Comments

Popular posts from this blog

ASP.NET Session States in SQL Server Mode

How to find client's MAC Address in Asp.Net and C#.net

Use XML Data For Save in Database