Announcement

Collapse
No announcement yet.

File creation question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • File creation question

    G'Day !
    Question in regards to writing a file.... I'm trying to create a file with a name based on today's date and hour.
    ie. 10/21/11/05.report

    this works if i wish to create a file by symbol
    fm = new File(getSymbol()+".report");

    but this doesn't if i sub in a variable for some reason...

    ReportDate = this.hour + "/" + this.day + "/" + this.month + "/" + this.year;

    debugPrintln("Date is "+ReportDate); //returns what i want
    fm = new File(ReportDate+".report");

    any ideas ?

    Chris

  • #2
    can't use a slash in a filename. try a dash.

    Comment


    • #3
      thanks Buhrmaster..... right on the money!!!

      Comment

      Working...
      X