represents date and time information that can be stored in a database.

Details and Options


open allclose all

Basic Examples  (1)

If you find that the examples in this section do not work as shown, you may need to install or restore the example database with the DatabaseLink`DatabaseExamples` package, as described in Using the Example Databases.

Open a connection:

This creates a table with data types DATE, DATETIME, and TIMESTAMP:

This inserts the same data into each column:

This selects the data as stored in the database:

This creates a table with data type TIME:

This inserts time data:

This selects the data:

Generalizations & Extensions  (1)

SQLDateTime expressions may be padded as necessary: