摘要:
java中string与date(日期)格式之间的转换经常遇到string和date之间的转换,把相关的内容总结在这里吧:1.string格式转化为Date对象://把string转化为dateDateFormat fmt =new SimpleDateFormat("yyyy-MM-dd"); Date date = fmt.parse(szBeginTime); test.setStartTime(date); 注意:引入的是:java.text.DateFormat2.Date格式转化为String对象:SimpleDateFormat sdf = new Simpl 阅读全文