CS-Library provides several routines that are useful for manipulating datatypes. They include:
cs_calc, which performs arithmetic operations on decimal, float, money, numeric, and real datatypes.
cs_cmp, which compares datetime, decimal, float, money, numeric, and real datatypes.
cs_convert, which converts a data value from one datatype to another.
cs_dt_crack, which converts a machine readable datetime value into a user-accessible format.
cs_dt_info, which retrieves datetime information for a national language.
These routines are documented in the Open Client and Open Server Common Libraries Reference Manual.