What's the most efficient way to remove the time portion from a Java date object using only Classes from within the JDK?
I have the following
myObject.getDate() = {java.util.Date}"Wed May 26 23:59:00 BST 2010"
To reset the time back to 00:00:00, I'm doing the following
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
Date myDate = sdf.parse(sdf.format(myObject.getDate()));
The output is now
myDate = {java.util.Date}"Wed May 26 00:00:00 BST 2010"
Is there a better way to achieve the same result?