![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
日期时间
哒不溜-w
为什么是人是鬼都在卷,我只想摆烂┭┮﹏┭┮
展开
-
MySQL,计算日期相差天数 & 字符串转日期,例:‘20230101’ => ‘2023-01-01’
str_to_date('2023','%Y%m%d %h%i%s')to_days('20230220')datediff('20230220','20230221')原创 2023-02-24 17:44:31 · 2837 阅读 · 0 评论 -
js获取当前年月日时分秒
js获取当前年月日时分秒原创 2022-06-09 09:24:16 · 127 阅读 · 0 评论 -
MySQL获取日期时间,计算日期时间
~原创 2022-06-07 11:42:06 · 3477 阅读 · 0 评论 -
js时间格式化和相互转换
1. Thu Mar 07 2019 12:00:00 GMT+0800 (中国标准时间) 转换为 2019-03-07 12:00:00 const d = new Date(Thu Mar 07 2019 12:00:00 GMT+0800 (中国标准时间)) const resDate = d.getFullYear() + '-' + this.p((d.getMonth() + 1)) + '-' + this.p(d.getDate()) const re原创 2022-05-10 16:18:59 · 1761 阅读 · 0 评论 -
java日期和时间戳格式互转
简单记录// 将日期格式转换成时间戳public static void main(String[] args) throws Exception{ String time = "2030-05-12 12:30:59"; Date parse = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(time); Long time1 = parse.getTime(); System.out.println(time原创 2022-04-08 14:53:42 · 851 阅读 · 1 评论