I'm trying to run the sp_BlitzFirst stored procedure (using the 7/15/2016 version) with the @AsOf parameter, and I'm getting this error:

EXEC sp_BlitzFirst @AsOf = '2015-02-23 18:45', @OutputDatabaseName = 'DBA', @OutputSchemaName = 'dbo', @OutputTableName = 'BlitzFirstResults'

Setting up configuration variables
Msg 241, Level 16, State 1, Line 1
Conversion failed when converting date and/or time from character string.

The SQL server version is 11.0.6020.0 (X64).

I used the example query from the documentation page and got this. It's choking on the triple ''' when trying to cast @AsOf to a varchar.

I've worked around this for now, but the documentation said to post here about errors thrown!

  • Have you tried using @AsOf = CONVERT(DATETIME, '2015-02-23T18:45:00.000') - this sounds like a localization issue. What locale are you using? What collation is used in this SQL Server instance?
    – Hannah Vernon
    Commented Aug 12, 2016 at 14:58
  • @Max Vernon, thanks! The compatibility level is 90, but I'm not sure if that's related or not. I've tried that way of doing it and it throws the same error. The collation is SQL_Latin1_General_CP1_CI_AS and the locale is 1033 / English. Right now, I've just changed the DateTimeOffset to be DateTime and it's working. I also tried things like 2016-08-12T08:45:00.000 -7:00 as specified in the datetimeoffset documentation page to no luck. Commented Aug 12, 2016 at 15:40
  • Only SQL Server 2008 and higher is supported. That could be the problem. Are you able to bump the compatibility level up to 100 or 110? Commented Aug 12, 2016 at 18:21

1 Answer 1


Unfortunately, compatibility level 90 (SQL Server 2005) is not supported.

From the known issues list at: https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit

"Only Microsoft-supported versions of SQL Server are supported here - sorry, 2005 and 2000. Some of these may work some of the time on 2005, but no promises, and don't file a support issue when they fail. (For example, we know the output tables won't work on SQL 2005 because one of the output fields is a DATETIMEOFFSET datatype, which isn't available in 2005.)"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.