Home > Back-end > Delphi how to use the current date for the file name saved?
Delphi how to use the current date for the file name saved?
Time:10-19
Today is March 31, 2013, for example, click save directly saved in 2013331. After TXT thank you
CodePudding user response:
Var F: TextFile; S: a string; The begin DateTimeToString (s, 'yyyymmdd', now); AssignFile (f, s + '. TXT "); Rewrite (f); CloseFile (f); end;
CodePudding user response:
Could you tell me how to set path confirmed, thank you don't know if I can do so I:=(' yyyymmdd ', now) Memo1. Lines. SaveToFile (F: \ IntToStr (I) + '. TXT ");