SQL Server DATEPART for year and month -
i have call in sql server 2012 need have working on server 2005 , 2008.
format(date, 'yyyymm') = 201501
using , need use datepart older versions of sql server cannot see way of doing easily.
any appreciated.
earlier versions of sql server don't have format
, you'd need like
year(date) = 2015 , month(date) = 1
or check 2 conditions
Comments
Post a Comment