Home:ALL Converter>Difference between oracle DATE and TIMESTAMP

Difference between oracle DATE and TIMESTAMP

Ask Time:2013-10-02T23:44:26         Author:supernova

Json Formatter

What are the difference between Oracle DATE and TIMESTAMP type? Both have date and time component? Also what is corresponding type in Java for these date types?

Author:supernova,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/19141030/difference-between-oracle-date-and-timestamp
Guillermo Luque :

DATE and TIMESTAMP have the same size (7 bytes). Those bytes are used to store century, decade, year, month, day, hour, minute and seconds. But TIMESTAMP allows to store additional info such as fractional seconds (11 bytes) and fractional seconds with timezone (13 bytes).\n\nTIMESTAMP was added as an ANSI compliant to Oracle. Before that, it had DATE only.\n\nIn general cases you should use DATE. But if precision in time is a requirement, use TIMESTAMP.\n\nAnd about Java, the oracle.sql.DATE class from Oracle JDBC driver, provides conversions between the Oracle Date/Timestamp data type and Java classes java.sql.Date, java.sql.Time and java.sql.Timestamp.",
2013-10-02T16:55:47
yy