Here is a function to use that will get the date/time for you:
import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
String getDateTime()
{
DateFormat dateFormat = new SimpleDateFormat("yyyy");
Date date = new Date();
return dateFormat.format(date);
}
You can edit that SimpleDateFormat to reflect what you want the date to show with instructions from here: http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
And if you're using our Output to CSV from the script repository, when you create the filename, you just call that function like this:
outputFile = "file name_" + getDateTime() + ."csv";
Here is a function to use
Here is a function to use that will get the date/time for you:
import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
String getDateTime()
{
DateFormat dateFormat = new SimpleDateFormat("yyyy");
Date date = new Date();
return dateFormat.format(date);
}
You can edit that SimpleDateFormat to reflect what you want the date to show with instructions from here: http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
And if you're using our Output to CSV from the script repository, when you create the filename, you just call that function like this:
outputFile = "file name_" + getDateTime() + ."csv";