I want to print GETDATE() in SQL Server 2008, I need the time with milliseconds (this is for debugging purpose - to find sp\'s execution time )
I find this Difference >
Try Following
DECLARE @formatted_datetime char(23) SET @formatted_datetime = CONVERT(char(23), GETDATE(), 121) print @formatted_datetime