这么些不行 让我转成String类型
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
prpSmain.setMakeDate(sdf.format(new Date()));/*出单日期*/
这么些不行 让我转成String类型
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
prpSmain.setMakeDate(sdf.format(new Date()));/*出单日期*/
import java.text.SimpleDateFormat;
import java.util.Date;
public class Test {
public static void main(String[] args) {
Date date = new Date();
SimpleDateFormat Format = new SimpleDateFormat("yyyy-MM-dd");
String time = Format.format(date);
System.out.println(time);
System.out.println("转成String为"+time.toString());
}
}