GETDATE

GETDATE

Returns the current system date and time in the standard internal format for datetime values that are supported by Microsoft® SQL Server™ 2000 Windows CE Edition (SQL Server CE).

Syntax
GETDATE ( ) 
Return Types

datetime

Examples

The following example uses GETDATE to supply information for a date column.

CREATE TABLE MyOrders (OrderID int IDENTITY(100, 1) PRIMARY KEY, CompanyName nvarchar(50), OrderDate datetime)
INSERT INTO MyOrders (CompanyName, OrderDate) VALUES ('A. Datum Corporation', GETDATE())

Show:
© 2016 Microsoft