How to print GETDATE() in SQL Server with milliseconds in time?

前端 未结 7 543
情书的邮戳
情书的邮戳 2021-02-03 16:49

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

7条回答
  •  时光说笑
    2021-02-03 17:07

    SELECT CONVERT( VARCHAR(24), GETDATE(), 113)
    

    UPDATE

    PRINT (CONVERT( VARCHAR(24), GETDATE(), 121))
    

提交回复
热议问题