You could try to parse them (for example with SimpleDateFormat) and format the resulting Date object again, but that is probably not the most efficient way. You could just use methods in class String to get the parts that you need and paste them together again.
Efficiency is overrated, I think. For most programs, IO/database operations are the slowest by far, and the speed of anything else is unimportant. I would try to make the method as easy as possible to understand and modify later if necessary - to do this, SimpleDateFormat is the way to go. It may be a little bit slower than the method Jesper suggests, but the chance that this will ever matter is remarkably small. [ February 16, 2008: Message edited by: Jim Yingst ]