1. String data = "1234-12-31 12:34:56"; DateTime dt = new DateTime(data,"yyyy-MM-dd HH:mm:ss"); 2. SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Calendar c = Calendar.getInstance(); c.add(Calendar.MONTH, -6); sdf.format(c.getTime());
最后
以上就是端庄鱼最近收集整理的关于字符串日期format的全部内容,更多相关字符串日期format内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复