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

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -