Table of ContentsPreviousNext

Ispirer
Please, note, that Ispirer SQLWays 6.0 is no longer supported and provided to clients.
You can try out automated conversion of databases and applications with Ispirer Toolkit for free. Download free trial.
Check out the relevant toolkit documentation.
Ispirer SQL Server Migration overview.


Ispirer SQLWays Database Migration Software

GETDATE

Syntax

GETDATE()

The GETDATE function returns the current system date and time.

Example

This example selects the current system date and time.

SELECT GETDATE() 
Here is the result set: 
____________________
July 31 1977   7:00    AM 

This example creates the Employees table and uses GETDATE for a default value for the employee hire date.

CREATE TABLE Employees
(
id INT NOT NULL,
name VARCHAR(100) NOT NULL,
hire_date DATETIME DEFAULT GETDATE()
) 

Equivalents in other databases

TABLE 91. Equivalents in other databases
IBM DB2
CURRENT TIMESTAMP special register
Oracle
SYSDATE function


Table of ContentsPreviousNext
Copyright 1999-2023 Ispirer Systems.
Ispirer and SQLWays are registered trademarks. All other product names may be trademarks of the respective companies.
All rights reserved.