上图: 代码: @Test public void test(){ DateTime time =new DateTime(); //获取当前时间 int tt =time.getMillisOfDay(); System.out.println(tt); } 注意:转换的只是天的时间戳,没有展示年的。 返回:JAVA中DateTime的用法总结 Post Views: 1,963 Related posts: JAVA中DateTime的getCenturyOfEra()用法? JAVA中DateTime如何获取当前月的第几天。getDayOfMonth的用法。 JAVA中DateTime如何获取年的第几天。getDayOfYear的用法。 JAVA中DateTime如何获取小时的分钟。getMinuteOfHour的用法。 JAVA中DateTime如何获取当前月份。getMonthOfYear的用法。 JAVA中DateTime如何获取分钟的秒数。getSecondOfMinute的用法。 分类: java 标签:DateTimegetMillisOfDayjava