Look here:
DateFormat and SimpleDateFormat Examples
Sample code:
public static void main(String[] args)
{
// Get the Date object that comes from DerbyDB...
//Date derbyDate = YOUR DATE FIELD HERE
// Make a SimpleDateFormat for toString()'s output. This
// has short (text) date, a space, short (text) month, a space,
// 2-digit date, a space, hour (0-23), minute, second, a space,
// short timezone, a final space, and a long year.
SimpleDateFormat format = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy");
// See if we can parse the output of Date.toString()
try
{
Date parsed = format.parse(derbyDate.toString());
System.out.println(parsed.toString());
}
catch(ParseException pe)
{
System.out.println("ERROR: Cannot parse \"" + derbyDate.toString() + "\"");
}
}