import java.text.*;
import java.util.*;
import java.sql.Timestamp;
public class Test{
public static void main( String args[] ){
Timestamp date1 = new Timestamp(System.currentTimeMillis());
style 1: //DateFormat dateFm = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, cale.CHINA);
//System.out.println(dateFm.format(date1));
style 2: SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
System.out.println(sdf.format(date1));
}
}
posted on 2006-01-10 20:44
happytian 阅读(153)
评论(0) 编辑 收藏