Link to home
Start Free TrialLog in
Avatar of faster
faster

asked on

date format

I need to get the default system date format, e.g. dd/mm/yy or m/d/yy from an applet.  Any good solution?
Avatar of setiawan
setiawan

Using SimpleDateFormat

SimpleDateFormat df = new SimpleDateFormat ("dd/mm/yy");
java.util.Date now = new Date();
now = df.parse(now.toString());

 danny
Avatar of faster

ASKER

I don't understand your answer.  What I need is to get the format, not to specify a format.
sorry, I think I have wrong perception
please, reject my answer
Thanks
Date date=new Date();
System.out.println(date.getDate()+"/"+date.getMonth()+"/"+date.getYear());

the getDate(),getMonth() and getYear() are the methods in the Date class under java.util.Date Package
Avatar of faster

ASKER

you don't understand my question.  I want to get the date format string. e.g. "dd/mm/yy" itself, not the specific date
ASKER CERTIFIED SOLUTION
Avatar of SMTW
SMTW

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial