Getdate Function
Why Getdate Function is used in SQL.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
TulasiRank #2,544 · 549 reputationPosted Oct 13, 2011, 8:25 PM EDT
GETDATE function is used to retrieve the current database system time in SQL Server. Its syntax is
GETDATE()
GETDATE does not require any argument.
Example: The SQL statement
SELECT GETDATE();
yields the following result:
'2000-03-15 00:05:02.123'
GETDATE function is most useful when we need to record the time a particular transaction happens. In SQL Server, we simply insert the value of the GETDATE() function into the table to achieve this. We can also set the default value of a column to be GETDATE() to achieve the same purpose.
Please do not forget to mark "Accpeted Answer".Prabhu RajaRank #861 · 2.6K reputationPosted Oct 13, 2011, 8:30 PM EDT
Select getDate() as SystemDateTime;
For more Information : Refer this Blog