如何格式化日期格式
来源:互联网 发布:试述数据库系统的组成 编辑:程序博客网 时间:2024/05/02 21:23
try
{
String origstr = "<164evt time:16 December 2010 00:08:20, 427521963770483461 informix 10.110.40.247 10.110.138.20 Logout";
int start = origstr.indexOf(":");
int end = origstr.indexOf(",");
String midstr = origstr.substring(start+1,end);
SimpleDateFormat origsdf = new SimpleDateFormat("dd MMMMM yyyy HH:mm:ss", Locale.ENGLISH);
Date date = origsdf.parse(midstr);
SimpleDateFormat destsdf = new SimpleDateFormat("MMM dd HH:mm:ss yyyy", Locale.ENGLISH);
String deststr = destsdf.format(date);
String finalstr = origstr.replace(midstr, deststr);//finalstr 就是你想要的字符串
}
catch(Exception px)
{
px.printStackTrace();
}
- 如何格式化日期格式
- javascript格式化日期格式
- js格式化日期格式
- Java日期格式化格式
- string.Format 格式化日期格式
- 格式化json日期格式对象
- JavaScript获取格式化日期格式
- SimpleDateFormat格式化日期时间格式
- C#中的数字格式化 格式日期格式化
- C#中的数字格式化、格式日期格式化
- mysql如何格式化日期?
- SqlServe零碎要点---sqlserver如何使用日期计算,DateTime类型的格式化以及语法格式等等。
- 如何转换日期格式
- easyUI如何格式化日期时间
- SQL格式化输出日期 时间格式
- SQL语句中格式化时间日期格式
- fmt标签格式化日期(多种格式)
- 使用jstl fmt格式化日期格式
- ubuntu安装手册
- 这就是我
- IIS下PHP的ISAPI和FastCGI比较
- redis shell 命令
- Loadrunnber 报错误:Error -- memory violation : Exception ACCESS_VIOLATION received.的一种情况
- 如何格式化日期格式
- 23,我依旧在做软件
- VI与VIM区别
- IMDN of Sip for the IM
- Delphi中SendMessage使用技巧
- win7下JAVA连接Oracle 10g
- Delphi 获取句柄 sendmessage
- VI Tip
- 统计数据库中所有用户表的记录数