Open Client CS-Library provides several routines that are useful for manipulating datatypes. They include:
cs_calc, which performs arithmetic operations on decimal, money, and numeric datatypes
cs_cmp, which compares datetime, decimal, money, and numeric 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 sets or retrieves language-specific datetime information
cs_strcmp, which compares two strings
These routines are documented in the Open Client and Open Server Common Libraries Reference Manual.