DATE AND TIME IN DB2
DB2 provides three datatypes to support date and time: Date, Time, and
Timestamp. When date and time values are to be used independently,
then the Date and Time datatypes should both be used. They will use
less space (seven rather than ten bytes) and have more formatting
options than the Timestamp datatype. However, if date and time
arithmetic must be performed together, a single Timestamp column is
easier to use than two columns for date and time are. Also, for
greater time precision, the Timestamp datatype wins. A Timestamp
column stores time to the microsecond (six decimal places) while time
only stores data to the second.
DB2 Date and Time datatypes offer more options, and care should be
taken to determine how your Date and Time columns will be used before
deciding which datatype to use. If you feel that date and time will be
needed together, then you should opt for the Timestamp datatype.