java.util.Date d2=new java.util.Date(System.currentTimeMillis());
simpleDateFormat=new java.text.SimpleDateFormat("dd MMM yyyy HH:mm:ss z");
date = simpleDateFormat.format(d2);
System.out.println("date2>>>>>>>>"+date);
Timestamp t = new Timestamp( simpleDateFormat.parse(d2.toGMTString()).getTime() );
System.out.println("TS = " + t);
http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
http://www.java2s.com/Code/Java/Database-SQL-JDBC/Timestampparse.htm
Thursday, December 10, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment