Hello,
The problem is, that a filename cannot contain several characters (including ':').
I don't really understand what is your issue... Anyway, here is a piece of code, which kinda does the 'trick'
import java.util.*;
import java.io.*;
public class T {
private static void aMethod(String fName)
{
Date aDate = new Date();
try{
BufferedWriter bw = new BufferedWriter(new FileWriter(fName));
bw.close();
}
catch (Exception anEx){} // handle filenotfound exception & friends
}
public static void main(String args[]){
String fileName;
Date aDate = new Date();
fileName = aDate.getDate()+"-"
+aDate.getMonth()+"-"
+aDate.getHours()+"."
+aDate.getMinutes()+".log";
aMethod(fileName);
}
}