My aim is to get a date in the format '{current year}-01-01 00:00:00' i.e. only the value for year changes with time. What is the best way to do that.
Using
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-01-01 00:00:00");
String format = simpleDateFormat.format(new Date());
doesnt seem clean enough.What other options do I have?