SQL SERVER – Difference Between GETDATE and SYSDATETIME

Posted by pinaldave on SQL Authority See other posts from SQL Authority or by pinaldave
Published on Thu, 10 Jun 2010 01:30:55 +0000 Indexed on 2010/06/10 1:33 UTC
Read the original article Hit count: 943

Sometime something so simple skips our mind. I never knew the difference between GETDATE and SYSDATETIME. I just ran simple query as following and realized the difference.

SELECT GETDATE() fn_GetDate, SYSDATETIME() fn_SysDateTime

In case of GETDATE the precision is till miliseconds and in case of SYSDATETIME the precision is till nanoseconds.

Now the questions is to you – did you know this? Be honest and please share your views. I already accepted that I did not know this in very first line.

Reference: Pinal Dave (http://www.SQLAuthority.com),


Filed under: Pinal Dave, SQL, SQL Authority, SQL DateTime, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology

© SQL Authority or respective owner

Related posts about Pinal Dave

Related posts about sql