DatabaseLink`
DatabaseLink`

SQLDateTime

SQLDateTime[datetime]

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

更多信息和选项

范例

打开所有单元关闭所有单元

基本范例  (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: