Alternative way to DetDate() function?

Answers were Sorted based on User's Feedback



Alternative way to DetDate() function?..

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

Alternative way to DetDate() function?..

Answer / vadivu

SELECT CURRENT_TIMESTAMP

(just searched in Help of SQL Server 2005)

Is This Answer Correct ?    4 Yes 1 No

Alternative way to DetDate() function?..

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

Alternative way to DetDate() function?..

Answer / selvaraj.v

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

Alternative way to DetDate() function?..

Answer / brahma prakash

SELECT current_date(for currentdate only)
SELECT NOW()

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More SQL Server Interview Questions

Explain the truncate command?

0 Answers  


can a database be shrunk to 0 bytes, if not, why? : Sql server administration

0 Answers  


How to list all tables having unique constraints in any of the columns in a database.

1 Answers  


What is the name of the system variable that returns the number of rows affected by a SQL statement?

0 Answers   HCL,


can we give the identity for existing column of the table? (already table contains 10(1-10) unique randam records)

2 Answers  






Explain the steps to create and execute a user-defined function in the sql server?

0 Answers  


What are the differences between “row_number()”, “rank()” and “dense_rank()”?

0 Answers  


How can you list all the columns in a database?

0 Answers  


What is #temp and @table variable in SQL server?

0 Answers  


Define left outer join?

0 Answers  


Can sql servers link to other servers?

0 Answers  


Explain what are page splits? : SQL Server Architecture

0 Answers  


Categories