时间戳与日期时间互换
来源:互联网 发布:酒吧调音软件 编辑:程序博客网 时间:2024/06/14 22:51
一、shell中求时间戳:
#date +%s
[oracle@henry-linux01 ~]$ date +%s
1484814460
[oracle@henry-linux01 ~]$ date -d"2017-01-19 00:00:10" +%s
1484755210
shell中时间戳换算成时间:
[oracle@henry-linux01 ~]$ date -d@1484813383 +"%Y-%m-%d %H:%M:%S"
2017-01-19 16:09:43
[oracle@henry-linux01 ~]$ date -d@1484814460
Thu Jan 19 16:27:40 CST 2017
二、mysql数据库中求时间戳
mysql> select unix_timestamp(now());
+-----------------------+
| unix_timestamp(now()) |
+-----------------------+
| 1484815072 |
+-----------------------+
1 row in set (0.00 sec)
mysql中根据时间戳换算成时间时期
mysql> select from_unixtime(1484815072);
+---------------------------+
| from_unixtime(1484815072) |
+---------------------------+
| 2017-01-19 16:37:52 |
+---------------------------+
1 row in set (0.00 sec)
- 时间戳与日期时间互换
- iOS 时间戳与时间互换
- js日期和时间戳互换
- Android时间戳和日期字符串互换
- js日期和时间戳互换
- 关于时间戳和日期,时间的互换
- 时间戳与Date形式互换
- 时间和时间戳互换
- 日期与时间戳
- Unix时间戳与C# DateTime时间类型互换
- linux命令行 UTC时间戳与时间互换
- SQL 10 函数 3 日期时间函数 - 1 日期、时间、日期时间与时间戳
- 日期与时间戳NSDate
- 格林威治标准时间,Unix时间戳与C# DateTime时间类型互换
- 时间戳 和 时间格式的互换
- Python 时间码与帧数的互换
- javascript日期与时间
- Oracle日期与时间
- POJ2255 Tree Recovery(二叉树遍历)
- C#86课的主要内容
- 洛谷P1025 数的划分(题目来源https://www.luogu.org/problem/show?pid=1025)
- RCP之Wizard开发- 怎么更新next和finish按钮
- Gamma 函数及其应用
- 时间戳与日期时间互换
- 网页提示对象不支持此属性或方法怎么解决
- 线段树—倒推优化
- tongbu
- 控制线段旋转角度和长度
- 招人以及团队建设
- URAL - 2105 Alice and Bob are on Bikes 整体处理、相遇问题
- angular-filemanager API docs
- 数据结构上机测试2-2:单链表操作B