This code converts a GEN timestamp to text: SET temp timestamp TO CURRENT_TIMESTAMP SET temp date TO datetimestamp(temp timestamp) SET temp time TO timetimestamp(temp timestamp) SET temp ms TO microsecond(temp timestamp) SET export text_20 TO substr(textnum(numdate(temp date)), 8, 8) SET export text_20 TO concat(trim(export text_20), substr(textnum(numtime(temp time)), 10, 6)) SET export text_20 TO concat(trim(export text_20), substr(textnum(temp ms), 10, 6)) And here is code to convert from text to timestamp: SET temp text_variable TO concat(substr(import text_20, 1, 4), concat("-", concat(substr(import text_20, 5, 2), concat("-", substr(import text_20, 7, 2))))) SET temp text_variable TO concat(trim(temp text_variable), concat("-",concat(substr(import text_20, 9, 2), concat(".", concat(substr(import text_20, 11, 2), concat(".", substr(import text_20, 13, 2))))))) SET temp text_variable TO concat(trim(temp text_variable), concat(".",substr(import text_20, 15, 6))) SET export timestamp TO timestamp(temp text_variable)