views:

39

answers:

1

Under new Date(); it has an error. I want to place it as a file name.

Date date = new Date();

SimpleDateFormat dateFormat = new SimpleDateFormat("ddMMyyyyHHmmSS"); filename = dateFormat.format(date).concat(".jpg");

+1  A: 

I hope that the following code will work fine.I tested it has no error. Date date = new Date(); SimpleDateFormat dateFormat = new SimpleDateFormat("ddMMyyyyHHmmSS"); String filename = dateFormat.format(date).concat(".jpg");

Manikandan