Java String??Data??Calendar??????
???????????? ???????[ 2016/1/27 10:32:42 ] ??????????????? ???????????
????1.Calendar ??? String
????Calendar calendat = Calendar.getInstance();
????SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
????String dateStr = sdf.format(calendar.getTime());
????2.String ???Calendar
????String str="2012-5-27";
????SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd");
????Date date =sdf.parse(str);
????Calendar calendar = Calendar.getInstance();
????calendar.setTime(date);
????3.Date ???String
????SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd");
????String dateStr=sdf.format(new Date());
????4.String ???Date
????String str="2012-5-27";
????SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd");
????Date date= sdf.parse(str);
????5.Date ???Calendar
????Calendar calendar = Calendar.getInstance();
????calendar.setTime(new java.util.Date());
????6.Calendar???Date
????Calendar calendar = Calendar.getInstance();
????java.util.Date date =calendar.getTime();
????7.String ??? Timestamp
????Timestamp ts = Timestamp.valueOf("2012-1-14 08:11:00");
????8.Date ? TimeStamp
????SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
????String time = df.format(new Date());
????Timestamp ts = Timestamp.valueOf(time);
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11