Hi Paul
Try this:
cDATE = SET('DATE')
SET PRINTER TO (CHRTRAN(tTOC(daTETIME()),' -:','')+'.TXT')
SET DATE (cDATE)
If the file's content is a string, you can create file like this:
cDATE = SET('DATE')
STRTOFILE(yourstring,(CHRTRAN(tTOC(daTETIME()),' -:','')+'.TXT'))
SET DATE (cDATE)
>Hello,
>
>I have codes to send an output file that supposed to be :
>
>ccyymmddhhmmss.txt will be 20040825183033.txt, datetime() is used maybe not sure
>
>please advise me how to do it:
>
>set print to c:\ccyymmddhhmmss.txt &&here to fix it
>set print on
>set console off
>select mytable
>set head off
>list off
>?"The process date is on "+dtoc(datetime())
>set print off
>set print to
>set console on
>
>At the end, my C: drive should have 20040825183033.txt
>
>TIA