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

Can a table have 2 foreign keys?

0 Answers  


Suggest a method of joining two tables.

0 Answers   Ernst Young, Thomson Reuters,


How to update a field in SQL after ALTERING a row?

0 Answers   Amdocs,


What is cursors?

0 Answers   NA,


What is a benefit of using an after insert trigger over using a before insert trigger?

0 Answers  






Explain syntax for viewing trigger?

0 Answers  


What are the rules to use the rowguidcol property to define a globally unique identifier column?

0 Answers  


How do I compare two values when one value(data type) is char and the other is an integer?

3 Answers  


What is a SQL Server Temporary Table?

1 Answers   Wipro,


What is de-normalization and when do you do it?

3 Answers  


What are the main control-of-flow T-SQL constructs?

1 Answers  


Help!!!!!!!!!!!! My database has gone offline, it is highlighted as 'Suspect'. Foolishly, i haven't got a recent back up. Is there a way of quickly restoring the database? Thank you

0 Answers  


Categories