thank you for your response!But I have a new problem.
I want a String as such format "2004-02-25 12:05:09".
which class and methods can I use?
I tried to do this as following:
java.util.Date dDate = new java.util.Date(System.currentTimeMillis());
String sDate = dDate.dDate.toLocaleString();
then, I execute my program....
sDate is "2004-02-25 12:05:09" in Windows Environment.(JBuilder9)
sDate is "Feb 25, 2004 12:05:09 AM" in Linux Environment.
I am very confused about this.
What difference can OS make???
and my Linux Environment is as following:
[ken@test47 consumer]$ java -version
java version "1.3.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)
[ken@test47 consumer]$ uname -a
Linux test47 2.4.18-3 #1 Thu Apr 18 07:37:53 EDT 2002 i686 unknown