Skip to content
Advertisement

SQL Format(‘MMMM’) does not work in SQL Server 2008

I had this query

However I migrated to a server using SQL Server 2008 and I get this error:

‘format’ is not a recognized built-in function name

What can I use to replace this format function?

Advertisement

Answer

This is a feature with SQL Server 2012 and higher. Try DATENAME(MONTH,[time]).

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement