Date formatString myDate = new SimpleDateFormat("dd MMM yyyy").format( new
java.util.Date() );
comp.lang.java.programmer is a good news group for java language related questions.
----- Original Message -----
From: Suresh Addagalla
To: [EMAIL PROTECTED]
Sent: Thursday, January 16, 2003 9:55 AM
Subject: Date format
Hi,
Please excuse me for the off-topic question, I need this urgently, so
posting it.
How can I get the current date format? (style: DateFormat.SHORT, locale:
Default)
I used:
SimpleDateFormat formatter = new SimpleDateFormat() ;
String format = formatter.toPattern() ;
It gives:
M/d/yy hh:mm a
But what I want is *only* the date part, excluding the time part of it.
Thanks,
Suresh