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”);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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”);