![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
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 · 845 阅读 · 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 · 2418 阅读 · 0 评论