valueOf() 返回封裝類Integer
parseInt()返回原始類型int
Date.valueOf(LocalDate date)=>Date
new Date(long lg)=>Date
new SimpleDateFormat(String dateFormat).parse(String str)=>Date
// Timestamp可以直接轉(zhuǎn)Date
Date dt = timestamp;
Timestamp.valueof(String str)=>Timestamp
Timestamp.valueof(LocalDateTime ldt)=>Timestamp
LocalDate.parse(String str)=>LocalDate
LocalDateTime.parse(String str)=>LocalDateTime
new SimpleDateFormat("yyyy-MM-dd").format(Date date)=>String
new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Timestamp ts)=>String