日期转换
String转date型
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
ParsePosition pos = new ParsePosition(0);
java.util.Date strtodate = sdf.parse("20120612", pos);
date转String型
SimpleDateFormat sdfs = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String tsStr = sdfs.format(strtodate);