时间格式
2013-03-22 19:03
85 查看
String fmt = "";
这里要format为yyyyMM-dd fmt = "yyyyMM-dd"; SimpleDateFormat sdf = new SimpleDateFormat(fmt); Date date = ....; String dateStr = sdf.format(date); 字母 日期或时间元素 表示 示例 G Era 标志符 Text AD y 年 Year 1996; 96 M 年中的月份 Month July; Jul; 07 w 年中的周数 Number 27 W 月份中的周数 Number 2 D 年中的天数 Number 189 d 月份中的天数 Number 10 F 月份中的星期 Number 2 E 星期中的天数 Text Tuesday; Tue a Am/pm 标记 Text PM H 一天中的小时数(0-23) Number 0 k 一天中的小时数(1-24) Number 24 K am/pm 中的小时数(0-11) Number 0 h am/pm 中的小时数(1-12) Number 12 m 小时中的分钟数 Number 30 s 分钟中的秒数 Number 55 S 毫秒数 Number 978 z 时区 General time zone Pacific Standard Time; PST; GMT-08:00 Z 时区 RFC 822 time zone -0800
Python 时间模块详解
http://blog.csdn.net/kiki113/article/details/4033017
相关文章推荐
- Java 时间格式处理
- SQL 时间格式格式化
- mysql unix准换时间格式查找指定日期数据
- sql语句控制时间的显示格式语句
- crontab时间格式表达式说明
- jquery 格式化 日期时间格式/ 金钱or百分比 格式
- SQL Server数据库中Date/Time 时间格式的转换[转]
- SQL时间格式转换大全
- dorado7时间格式调整
- 通过phpexcel获取时间并转换为正常格式
- c#.net 获取时间日期年月日时分秒格式
- SQL一些时间格式的转换
- Jackson框架转换时间格式不匹配的问题
- js时间戳-------日期格式
- Oracle中 06-SEP-12 08.00.00.000000 AM 时间类型 转为 正常时间格式
- 比较两个时间的差别并且显示为易于读取的格式
- 时间格式
- 用js将从后台得到的时间戳(毫秒数)转换为想要的日期格式
- 在VC2008中将UTC时间转换为标准格式
- ISO 8601 时间格式之Duration转换成TimeSpan