Hi all,

I was wondering if any of you could tell me how to convert a date format that is being returned in my XML.

The element content is being returned as a string of form


The XML is a copy of some metadata of an object in my database. The database stores the date of he form "11/16/2010 11:00:00"

Is there away of converting the string from my XML back to a moer typical date format (Ignoring the substring remove T, Z type approach)?

many thanks


Use the SimpleDateFormat class - create an instance using a pattern that describes your date's format, then use the parse method to convert your String to a java Date object. Once you have a Date object you can use another SimpleDateFormat to convert that to pretty much any format you want.