Qualifier of a date-time or interval data type

The mi_type_qualifier() function returns the encoded qualifier of a DATETIME or INTERVAL data type from a type descriptor. This qualifier is the internal value that the database server uses to track the complete qualifier range, from the starting field to the end field. It is the value stored in the collength column of the syscolumns table for DATETIME and INTERVAL columns.

You can use the qualifier macros and constants (see Qualifier macros and constants for mi_datetime and mi_interval data types) to interpret this encoded value.

In Obtaining type information for a DATETIME value, the value in type_qual contains the encoded integer qualifier (3594) for the dt_col column. You can obtain the starting qualifier for the DATETIME value from the encoded qualifier with the TU_START macro, as follows:
TU_START(type_qual)
This TU_START call yields 0, which is the value of the TU_YEAR constant in the datetime.h header file. You can obtain also the ending qualifier for the DATETIME value from the encoded qualifier with the TU_END macro, as follows:
TU_END(type_qual)

This TU_END call yields 10, which is the value of the TU_SECOND constant in the datetime.h header file. Therefore, the encoded qualifier 3594 represents the qualifier year to second.