-
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" );
System.out.println(datOutput.format(rs.getDate(25)));
What comes out is "03/00/2003"
Does anyone have any idea why the month info is not being displayed?
many thanks!
-
I believe "mm" should be capitalized. "MM"
yup, month is MM and minutes is mm
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|