Date Conversion
Hi all I am sure that this is a quite simple task, and I am just not thinking of the right thing. I want to convert a string which will have the format of "dd-mmm-yyyy" into an sql date so that I can run it against a database. The only thing that has come to mind is to switch around the year and the day and convert the mmm into mm and use the Date(int int int) constructor, but that has been deprecated.
Can someone suggest something that I am obviously missing ?
thanks in advance.
[504 byte] By [
Aknibbsa] at [2007-11-26 13:56:53]

Thanks it worked beautifully. For those who may search for this in the future here is what I used:
(dateToday is a string containing today'sdate
sqlEnd is a java.sql.Date to search in the database
*Note* pay special attention to the format took me a few minutes to realize why mmm wasn't working)
SimpleDateFormat sDateFormat = new SimpleDateFormat("DD-MMM-yyyy");
sqlEnd = new Date(sDateFormat.parse(dateToday).getTime());
Hope this helps someone in the future, and thanks again paul.
Perhaps I jumped the gun a bit on my thinking it works perfectly. It works for both the year and the day, but not for the month.
I am using the following code (This was the smallest base test i could think of):
SimpleDateFormat sDateFormat = new SimpleDateFormat("DD-MMM-yyyy", Locale.ENGLISH);
logger.warn("BADConverter : " + sDateFormat.parse("05-MAR-2005") );
And the result that I am getting is :
BADConverter : Wed Jan 05 00:00:00 CST 2005
Is there something obvious that I am missing here/ a footnote that I am missing ?
thanks again
*Edit*
Removed the side question about the api as it now makes sense.