FileWriter date null value
I have a date value that I want to write onto a file using
fw = new BufferedWriter(new FileWriter(root + "/log.txt"));
fw.newLine();
fw.write("," + "server timestamp " + "," + " Timestamp");
fw.newLine();
fw.write( " ,");
fw.write(dateString + "," + currentTimeStamp);
but everytime dateString and currentTimeStamp are null, via toast I can
see that dateString and currentTimeStamp are not null, yet I cannot write
them via FileWritter.
Here is the code for dateString
SimpleDateFormat formatter = new SimpleDateFormat("HH-mm-ss_SSS");
dateString = formatter.format(returnTime);
currentTimeStamp = formatter.format(new Date());
No comments:
Post a Comment