you can add months also using this function by passing duration in second parameter.
DECLARE @Currentdate DATETIME2.SET @Currentdate = '12/12/2010'3.SELECT EOMONTH ( @Currentdate,-2 ) AS Result;4. 5./*Result6.2010-10-31 */
No comments:
Post a Comment