js中把数据库时间转为正常值
2016-01-04 20:45
218 查看
function timeFormatter(value) {
var da = new Date(parseInt(value.replace("/Date(", "").replace(")/", "").split("+")[0]));
return da.getFullYear() + "-" + (da.getMonth() + 1) + "-" + da.getDate()
+ " " + da.getHours() + ":" + da.getMinutes() + ":" + da.getSeconds();
}
var da = new Date(parseInt(value.replace("/Date(", "").replace(")/", "").split("+")[0]));
return da.getFullYear() + "-" + (da.getMonth() + 1) + "-" + da.getDate()
+ " " + da.getHours() + ":" + da.getMinutes() + ":" + da.getSeconds();
}
相关文章推荐
- redis 学习整理笔记
- mysql禁用validate_password插件
- SQL优化(四) PostgreSQL存储过程
- SQL优化(二) 快速计算Distinct Count
- linux下oracle设置开机自启动实现方法
- SQL优化(一) Merge Join VS. Hash Join VS. Nested Loop
- SQlite 使用笔记
- SQLite-常规用法
- SQL优化(三) PostgreSQL Table Partitioning
- iOS 数据库升级策略
- 将oracle dml操作封装为类,成为一个模块
- MySQL的分页优化
- 通过 ssh tunnel 连接 远程mysql数据库
- 【iOS】数据库SQLite3的使用
- 数据库——关系型数据库管理系统
- debain mariadb10配置root
- ORM框架中用枚举类型enum来接收数据库中的tinyint字段
- 关系型数据库基础第一章
- 打造先进的内存KV数据库-4 伙伴内存管理系统
- 转【实战体验几种MySQLCluster方案】