--The code below, in a nutshell, captures cases where the user may change the date inappropriately (if not null out the field) and provides some validation error if not gives you the "YYYY-MM-DD" format as intended. Use this in your saveInto for the value-- if( or( rule!APN_isBlank(ri!date), len(year(ri!date)) <> 4, and( or( month(ri!date) = 10, month(ri!date) = 11, month(ri!date) = 12 ), len(month(ri!date)) <> 2 ), and( or( month(ri!date) = 1, month(ri!date) = 2, month(ri!date) = 3, month(ri!date) = 4, month(ri!date) = 5, month(ri!date) = 6, month(ri!date) = 7, month(ri!date) = 8, month(ri!date) = 9 ), len(month(ri!date)) <> 1 ), and( len(day(ri!date)) <> 1, len(day(ri!date)) <> 2 ) ),null, tostring( year(ri!date)&"-"& if(len(month(ri!date))=1, "0"&month(ri!date), month(ri!date) ) &"-"& if(len(day(ri!date))=1, "0"&day(ri!date), day(ri!date) ) ))