Sybase SQL Anywhere DATETIME data type stores date and time data - year, month, hour, minute, second and fraction of a second.
Quick Example:
-- Define a table with a DATETIME column in Sybase SQL Anywhere CREATE TABLE orders ( order_datetime DATETIME ); -- Insert a datetime value - March 20, 2012 05:09:31.123456 INSERT INTO orders VALUES ('2012-03-20 05:09:31.123456');
In Oracle, you can use TIMESTAMP or DATE data type. They both can store date and time data.
Conversion to TIMESTAMP ( denotes syntax or functional differences, or more strict restrictions):
If your database does not use the fraction of seconds in Sybase DATETIME data types, you can convert it to the DATE data type in Oracle:
Last Update: Sybase SQL Anywhere 12.0 and Oracle 11g
See DATETIME for more details.
DATETIME conversion examples.
Sybase SQL Anywhere:
CREATE TABLE orders ( order_datetime DATETIME );
Oracle:
CREATE TABLE orders ( order_datetime TIMESTAMP(6) );
Sybase SQL Anywhere
Oracle