我需要仅包含yyyy-mm-dd格式的日期,因为DB2表具有日期列的10精度。
Date date = new Date(); String modifiedDate= new SimpleDateFormat("yyyy-MM-dd").format(date);
这就可以了。