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
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL