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

What is the difference between writing data to mirrored drives versus raid5 drives

0 Answers  


select name of emplyoee whose total salary is 130 from following table. id name salary 1 a 100 2 b 20 3 c 50 1 a 30 2 b 70 Post the resulantant Query?

7 Answers  


CTE(common table expression)

1 Answers   Thomson Reuters,


Why functions are used in sql server?

0 Answers  


What is primary key and example?

0 Answers  






Explain unique key in sql server?

0 Answers  


Find nth lowest salary or get nth lowest salary?

0 Answers  


What is a dbms wizard?

0 Answers  


Tell me about pre-defined functions of sql?

0 Answers   EXL,


Which index created when Create Index on table(col), Why

2 Answers   CGI,


What is the purpose of optimization?

0 Answers  


What is the language structure to add a record to a table?

0 Answers  


Categories