Alternative way to DetDate() function?
Answers were Sorted based on User's Feedback
Answer / suraj
Selvaraj, You are wrong. I tested it.
Please, look at the output of these below queries.
'GetUTCDate' results in time difference which means it will
not give you the exact result as 'GETDATE()'.
SELECT GETUTCDATE()
-----------------------
2009-11-30 22:15:15.243
SELECT GETDATE()
-----------------------
2009-11-30 16:15:15.243
SELECT CURRENT_TIMESTAMP
-----------------------
2009-11-30 16:15:15.243
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / vadivu
SELECT CURRENT_TIMESTAMP
(just searched in Help of SQL Server 2005)
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / rajesh.a
Hi Selvaraj,
It is clearly seems to be a spelling mistake.so,stop pointing out such silly mistakes.Any one can knows that he is asking about getdate()
Is This Answer Correct ? | 1 Yes | 0 No |
First you Clearly Learn.It's GetDATE() function, Not DetDate
() function.
In SQL Server 2000 Query :
--------------------------
Select GetDate()
Output:
------
2008-01-22 17:37:20.280
Alternate to GetDate() function:
--------------------------------
Select GetUTCDate()
Output:
-------
2008-01-22 17:37:20.280
GetUTCDATE() means Greenwhich Mean Time of Current Date
Time.
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / brahma prakash
SELECT current_date(for currentdate only)
SELECT NOW()
Is This Answer Correct ? | 0 Yes | 3 No |
Explain the truncate command?
can a database be shrunk to 0 bytes, if not, why? : Sql server administration
How to list all tables having unique constraints in any of the columns in a database.
What is the name of the system variable that returns the number of rows affected by a SQL statement?
can we give the identity for existing column of the table? (already table contains 10(1-10) unique randam records)
Explain the steps to create and execute a user-defined function in the sql server?
What are the differences between “row_number()”, “rank()” and “dense_rank()”?
How can you list all the columns in a database?
What is #temp and @table variable in SQL server?
Define left outer join?
Can sql servers link to other servers?
Explain what are page splits? : SQL Server Architecture