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 |
how can ur insert the emp table
Explain activity monitors
How to insert new line characters into strings?
What are the advantages of user-defined functions over stored procedures in sql server?
How to find the list of fixed hard drive and free space on server?
What is awe?
what is the difference between group and having give an example with query and sample output
What is the preferred way to create a clustered and non-clustered index? Which index should you create first the clustered or non-clustered?
Explain different backup plans?
List the different index configurations possible for a table?
What is read committed?
What are the difference between data length and length in SQL Server-2008?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)