Android--获取系统当前日期和时间
/** * 获取系统当前日期和时间 * @return */ public static String getSystemDataATime(){ //24小时制 SimpleDateFormat dateFormat24 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); //12小时制// SimpleDateFormat dateFormat12 = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); return dateFormat24.format(Calendar.getInstance().getTime()); }