Do you remember DATEADD and DATEDIFF functions?
What does the following statement do?
SELECT DATEADD(DD, 0, DATEDIFF(DD, 0, GETDATE()))
A. Return the current system date unchanged.
B. Return just the date part of the current system date removing the time.
C. Return the integer value of the current system date.
D. The statement will generate an error. The second parameter of the DATEDIFF function should be a DATETIME data type.
Answer:[B]
Highlight to find out the answer.
Sunday, February 14, 2010
DATEADD
at 7:37 PM
Labels: SQL Server, SQL Server Test, SQL Server Tip
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment