SimpleDateFormat
宁文文
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
oracle格式化带星期上午等字样时间
java在通过SimpleDateFormat获取时间存数据库时如果不格式化会出现【20-10-26 上午10:47】的时间样式,oracle在处理时就很烦未经过格式化处理的时间:String cttime = new SimpleDateFormat().format(new Date());System.out.println(cttime);运行结果:20-10-26 上午10:47格式化处理过的时间:Date date = new Date();String strDateFo原创 2020-10-26 11:11:22 · 1071 阅读 · 0 评论 -
java将时间变为时间戳
/** * 时间变为时间戳 * @param s * @return * @throws ParseException */ public static String dateToStamp(String s) throws ParseException{ String res; SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); .原创 2020-08-06 15:40:54 · 2495 阅读 · 0 评论
分享