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?
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
please, reject my answer
Thanks
Date date=new Date();
System.out.println(date.ge tDate()+"/ "+date.get Month()+"/ "+date.get Year());
the getDate(),getMonth() and getYear() are the methods in the Date class under java.util.Date Package
System.out.println(date.ge
the getDate(),getMonth() and getYear() are the methods in the Date class under java.util.Date Package
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SimpleDateFormat df = new SimpleDateFormat ("dd/mm/yy");
java.util.Date now = new Date();
now = df.parse(now.toString());
danny