ISODateTimeFormat 转换2019-08-15T00:36:49.366456463Z 日期格式
2024-09-06 01:07:26
import java.text.*;
import java.text.SimpleDateFormat;
import java.util.*; import org.joda.time.DateTime;
import org.joda.time.format.ISODateTimeFormat; /**
* Created by sixinshuier on 2019/08/15
*/
public class Test { public static void main(String args[]) throws ParseException {
DateTime date = ISODateTimeFormat.dateTime().parseDateTime("2019-08-15T00:36:49.366456463Z");
DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
Date time = df.parse(date.toString());
SimpleDateFormat df1 = new SimpleDateFormat("EEE MMM dd HH:mm:ss Z yyyy", Locale.UK);
Date date1 = df1.parse(time.toString());
DateFormat df2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String str = df2.format(date1);
System.out.println(str);
}
}
最新文章
- 2014优秀的好用的20款免费jQuery插件推荐
- pkg-config
- JAVA 设计模式 迭代器模式
- Fragment与FragmentActivity的关系
- win7登录后开机密码破解读取
- GSM Hacking:如何对GSM/GPRS网络测试进行测试
- EF——使用Data Annotations和Fluent API配置数据库的映射配置 02.01(转)
- 自然数e这家伙怎么蹦跶出来的?
- iOS9适配系列教程
- CImageList使用简要说明
- bzoj 2734: [HNOI2012]集合选数
- winserver-查看登陆日志
- 2017-2018_OCR_papers汇总
- c/c++ include 头文件的方式
- POI如何自动调整Excel单元格中字体的大小
- USBDM RS08/HCS08/HCS12/Coldfire V1,2,3,4/DSC/Kinetis Debugger and Programmer -- MC9S08JM16/32/60
- 2018.09.08 NOIP模拟eat(贪心)
- 关于Android中Fragment静态和动态加载的方法
- xdotool xdotool模拟击键和鼠标移动--CutyCapt是一个截图工具,xvfb-run
- node中session的管理
热门文章
- Linux文件/proc/net/tcp分析
- Windows定时重新启动(适用于server 2012 r2)
- [计算机图形学]视图变换:MVP变换、视口变换
- 如何使用 Navicat Premium 的新“自动运行”工具自动运行行数据库复制。
- Using Sqoop to import from db2 to hadoop
- Loki日志系统
- redis.conf 配置说明
- 几种常见css布局
- 话说 wait、notify 、 notifyAll
- 剑指 Offer 34. 二叉树中和为某一值的路径 + 记录所有路径