-
-
-
/** * 获取当前时间 * * @return %y%m%d%H%M%S (例如: 161202170521) */ public static String GetCurrentFormatTime() { Time time = new Time(); time.setToNow(); return time.format("%y%m%d%H%M%S"); }--
-
/** * 获取当前时间 自定义格式时例:2012/07/07 12:12:01 * 如果要2012/07/07 12:12格式的, 就 .substring(0, 14) * * @return */ public static String GetCurrentFormatTime1() { Time time = new Time(); time.setToNow(); return time.format("%y/%m/%d %H:%M:%S"); // return time.format("%y/%m/%d_%H:%M"); }