Scale of a date-time or interval data type

For the DATETIME and INTERVAL data types, the scale is the encoded integer value for the end qualifier

In Obtaining type information for a DATETIME value, the call to the mi_type_scale() function stores in type_scale the scale for the dt_col column. This precision has a value of 10 because the end qualifier for the DATETIME YEAR TO SECOND data type is SECOND, whose encoded value (TU_SECOND) is 10.

The DataBlade® API also provides functions that obtain DATETIME or INTERVAL scale of an input parameter, a UDR argument, UDR return value, or column. For a list of these functions, see DataBlade API functions that obtain DATETIME or INTERVAL information.