SDF format is defined by no delimiter nor separator, so fields are not trimmed, from that alone it doesn't make sense to trim the field while outputting. Besides that the COPY TO command only accepts a field list, not a list of expressions like ALLTRIM(field).
You can output to a txt file without COPY TO, There are FPUTS or STRTOFILE, just generate line by line, for example via STRTOFILE(Alltrim(date1)+chr(13)+chr(10),"out.txt",.t.) in a SCAN..ENDSCAN.
Bye, Olaf.