java如何将数据库取得的时间转换为string类型在页面显示
java如何将数据库取得的时间转换为string类型在页面显示
日期:2010-11-04 18:18:00 人气:1
import java.text.ParseException;
import java.text.SimpleDateFormat;
public class Dog {
public static void main(String[] args) {
String str = "2010-11-4 17:50:55.66";
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd&