日期时间应用和hibernate映射.pdfVIP

  • 3
  • 0
  • 约2.93千字
  • 约 3页
  • 2021-03-06 发布于福建
  • 举报
日期及时间 java.text. SimpleDateFormat java.text.Date java.text.Calendar 时间比较 时 间 是 越 往 后 值 越 大 时间类 GregorianCalendar 此类继承 Calendar(抽象类 )。获得日期时间的方法: 类对象 .get(Calendar.YEAR)获得年, 类对象 .get(Calendar.AM_PM) 获得上午还是下午, 0 为 AM ,1 为 PM ,12 点 均是 0 类对象 .get(Calendar.DAY_OF_WEEK) 获得星期,周日为 1,周六为 7 类对象 .get(Calendar.MONTH) 获得月值为 0-11,所以应当再加 1 其它的类推,查看 Calendar类的 Field Summary 日期时间运用 获得当前时间(毫秒) long nowsencond = System.currentTimeMillis() 获得当前日期 System.out.println(new

文档评论(0)

1亿VIP精品文档

相关文档