Use dateFormat.parse() instead of dateFormat.format(), since you want to parse your String into Date object. Then, when you have the Date object, format it to String with wanted format. @Jens already gave you the full code, so no need to copy it again here.