The Official BLOG and Wiki for CustomMode.com
[ start | index | login ]
start > 2005-03-18 > 1

2005-03-18 #1

Created by dmitry. Last edited by dmitry, 3 years and 295 days ago. Viewed 332 times. #1
[edit] [rdf]
labels
attachments

Java Date formatting

Many people complaining that date formatting is a paing in java. It might be easier then you think. Here is the example:

DateFormat fDateFormat = DateFormat.getDateInstance(DateFormat.SHORT);
System.out.println(fDateFormat.format(new Date()));

For more details on DateFormat see the API: >>http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormat.html

and more:

>>http://java.sun.com/docs/books/tutorial/i18n/format/simpleDateFormat.html

no comments | post comment
custommode.com | ©2000-2005
webmaster at custommode dot com