GETDATE Function [Date and Time]

Returns the current date and time.

Syntax

GETDATE ()

Returns

TIMESTAMP

Example

The following statement returns the system date and time.

SELECT GETDATE( ) FROM iq_dummy

Usage

GETDATE is a Transact-SQL compatible data manipulation function.

Standards and Compatibility

  • SQL—Vendor extension to ISO/ANSI SQL grammar.

  • Sybase—Compatible with Adaptive Server Enterprise.