第1个回答 2008-08-17
代码如下:把转化之后的日期放在动态数组中
import java.util.Date;引入日期包
import java.text.SimpleDateFormat;引入日期格式化包
ArrayList<String> a1=new ArrayList<String>();
while(rs.next())
{
SimpleDateFormat formatDate = new SimpleDateFormat("yyyy年MM月dd日");
Date date =rs.getDate(" 数据库日期列");
a1.add(formatDate.format(date));
}
第2个回答 2008-08-16
new SimpleDateFormat("yy-MM-dd hh:mm:ss").Format(new Date());
第3个回答 2008-08-16
也可在数据库内处理这个问题,直接数据库内部装换,采用如下方法
convert(varchar2,getdata(),101)
第4个回答 2008-08-17
new SimpleDateFormat("yy-MM-dd hh:mm:ss").Format(new Date());