3

I need Date with only yyyy-mm-dd format, because DB2 table having 10 precision of date column.

4

1 回答 1

36
Date date = new Date();
String modifiedDate= new SimpleDateFormat("yyyy-MM-dd").format(date);

This will do.

于 2013-05-07T07:00:22.693 回答