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 |
Comment,Datatypes are unlimited
Why are sql functions used?
check, not null,unique
Explain the creation and execution of a user-defined function in the sql server?
How to get the query of a table in sql server?
Stored Procedure returns data from multiple tables. How to access it in your ASP.Net code?
What are cursors? Explain the different types of cursors Enlist a few disadvantages of cursors.
How to store pdf file in sql server?
1 Answers CarrizalSoft Technologies, College School Exams Tests, TATA,
What is difference between getdate and sysdatetime in sql server 2008?
Which operator do you use to return all of the rows from one query except rows are returned in a second query?
Tell me what is a linked server?
What is the difference between Userdefined function and stored procedure? Explain and give the example also