It seems your SQL Server compatibility level is incorrect.
First you can check what it is
SELECT compatibility_level FROM sys.databases
WHERE name = 'ASPSnippets'

Then you can set it to 130. In order to use the function.
ALTER DATABASE [ASPSnippets]
SET COMPATIBILITY_LEVEL = 130
SELECT compatibility_level FROM sys.databases
WHERE name = 'ASPSnippets'

After that when you try again, it will work.
