SimpleDateFormat
2018-07-20 本文已影响12人
四喜汤圆
哎呀!!!!!!!!!!!&#!@*SimpleDateFormat的格式问题
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
上面这样式的,调用
sdf.parse("2018-07-20")
得到的Date是2018-07-20
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd");
上面这样式的,调用
sdf.parse("2018-07-20")
得到的Date是2018-01-20【看好喽!!是一月份】