r/SQLServer • u/PathTooLong • Apr 09 '26
Question SQL Server Profiler and Datetime parameters
It really bugs me when running the SQL Server Profiler with datetime type parameters. The captured SQL always has fraction milliseconds. ChatGTP says this is an issue because the datetime is sent as binary but the profiler has problems processing it. This is really a problem when you are troubleshooting SQL statements and the profiler shows your date range with fractional milliseconds. You have to know the profiler has issues and adjust the parameters when testing is SSMS. I am using the latest SSMS/Profiler.
Edit: as many people posted below, SQL Server Profile is deprecated - https://learn.microsoft.com/en-us/sql/tools/sql-server-profiler/sql-server-profiler?view=sql-server-ver17
View all comments
Show parent comment
1
u/ComicOzzy Apr 13 '26 edited Apr 13 '26
Can you switch to using
.Add()and specifySqlDbType.Date?EDIT: Well... shit.
OK, Claude says this is just a display issue with SQL Server. The parameter is being automatically detected as DateTime, but that still worries me because the precision on that datatype is approximately 3ms.