Wednesday, October 11, 2023

Database - Difference between oracle Date and Timestamp types

  • 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).
  • TIMESTAMP was added as an ANSI compliant to Oracle. Before that, it had DATE only.
  • In general cases you should use DATE. But if precision in time is a requirement, use TIMESTAMP.




No comments:

Post a Comment

Featured Post

OIC - how can I use XSLT functions to remove leading zeros from numeric and alphanumeric fields?

To remove leading zeros from an numeric field in Oracle Integration Cloud (OIC) using XSLT, you can Use number() Function The number() funct...