一、背景
点击查看代码
SimpleDateFormat df1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = new Date();
Date da = new Date(date.getYear(),date.getMonth(),01);
Timestamp timestamp = Timestamp.valueOf(df1.format(da));
System.out.println(timestamp);