create table TBL_MESSAGE
(
  ID           NUMBER,
  NOTE         VARCHAR2(100),
  SENDUNAME    VARCHAR2(20),
  RECEIVEUNAME VARCHAR2(20),
  POSTTIME     DATE default SYSDATE,
  READSIGN     NUMBER
)
建表信息,POSTTIME格式例如2011/11/30 11:00:01用JAVA取时间
public class Message {
public Message(){}
public Message(int id,String note,String sendUname,String receiveUname
,Date postTime,int readSign){
this.id = id;
this.note = note;
this.sendUname = sendUname;
this.receiveUname = receiveUname;
this.postTime = postTime;
this.readSign = readSign;
}
private int id;
private String note;
private String sendUname;
private String receiveUname;
private Date postTime;
private int readSign;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
public String getPostTime() {
SimpleDateFormat formater = new SimpleDateFormat("yy-MM-dd HH:mm:ss");
String strCurrentTime = formater.format(postTime);
return strCurrentTime;
}
public void setPostTime(Date postTime) {
this.postTime = postTime;
}
可是在调用类的getPostTime方法,在网页上显示的只有日期,没有时分秒。伤肺,求高人~