I have a field with Date/Time data type in an ACCESS table which gets a date by calling =Now() whenever a record is inserted.

I am retrieving this date in different .jsp files.

When i call DateFormat.getDateInstance().format(resultSet.getD ate("sDate"))
it formats it perfectly in "Apr 01, 2004", like i want it.

But im also using Java Taglibs in some .jsp files which use <sql:getColumn position=1 name=sDATE> and retrieve it using pageContext.getAttribute().

The point is i am receiving the date in a String at some places. when i try to parse it using DateFormat.getDateInstance().parse() i get a NumberFormatException saying could not parse "2004-04-01 00:00:00:00" probably because the date to string is storing a 0 value for the time portion.

How can i parse it or get around to recieve just the date part and format it like Apr 01, 2004 while in the ACCESS database dates are stored in the Short Date format like 4/1/2004.