Previous Topic: Data TypesNext Topic: Host Variable Data Types


DATE, TIME, and TIMESTAMP

DATE, TIME, and TIMESTAMP are special SQL data types that are stored and manipulated in CA Datacom/DB as BINARY data with lengths 4, 3, and 10 respectively. However, when SQL retrieves this type of data from the database, it sends it back to the user in CHARACTER form. When you specify this type of data to send to the database, you specify it in CHARACTER form. See Character String Literals.

If you are accessing the data with non-SQL commands, the data is in the internal form which is BINARY and you must perform the conversion from the internal form yourself. See the CA Datacom/DB Database and System Administration Guide for an explanation of how DATE, TIME, and TIMESTAMP data types are stored in CA Datacom/DB.