date formatting in java
Hi there. Sure I'm being dumb but can't figure this out!
I'm bringing back a date field from my database via stored procedure. For some reason though the month information is not being displayed. The field in question is a datetime field in a Sybase database and in this example contains the value "Mar 3 2003 12:00AM"
Here's the code I use to output.
SimpleDateFormat datOutput = new SimpleDateFormat( "dd/mm/yyyy" );
What comes out is "03/00/2003"
Does anyone have any idea why the month info is not being displayed?
I believe "mm" should be capitalized. "MM"
yup, month is MM and minutes is mm
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center