- SimpleDateFormatformatter=newSimpleDateFormat("yyyy年MM月dd日HH:mm:ss");
- DatecurDate=newDate(System.currentTimeMillis());//获取当前时间
- Stringstr=formatter.format(curDate);
------------------------------------------------------------------华丽的分割线----------------------------------------------------
- SimpleDateFormatsDateFormat=newSimpleDateFormat("yyyy-MM-ddhh:mm:ss");
- Stringdate=sDateFormat.format(newjava.util.Date());
------------------------------------------------------------------华丽的分割线----------------------------------------------------
- SimpleDateFormatsdf=newSimpleDateFormat("yyyy-MM");
- Stringdate=sdf.format(newjava.util.Date());
-------------------------------------------------------------------华丽的分割线---------------------------------------------------
- df=DateFormat.getDateTimeInstance(DateFormat.FULL,DateFormat.FULL,Locale.CHINA);
- System.out.println(df.format(newDate()));