h=sqlconnect(...) sqlexec(h, "use {your database here}") cTable='{your table here}' sqlexec(h, "sp_columns ?cTable", "curColumns") select * from curColumns where data_type=11; into curs curDateTimes ldt={^1899/12/30} scan cField=alltrim(column_name) sqlexec(h, "update ?cTable set "+cField+"=null where "+cField+"=?ldt") endscan sqldisconnect(h)You may put another loop around this to extract table names first (call sp_tables), so to loop through all of your tables. You'll also need some checking to see whether you have any datetime fields at all, what was the result code from each of your sqlexec()s etc etc. This is just the bare bones approach.