当前位置:网站首页>mysql查询时间戳转换成日期格式
mysql查询时间戳转换成日期格式
2022-06-24 20:23:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
在很多的数据表中,很多日期的记录都是以时间戳的格式来存储,在查询的时候无可避免的会带来查看数据的不方便,作者在之前总是通过程序的方式去处理,后来通过查询,发现可以直接在数据表中进行查询。如下图中regdate是时间戳的格式,没法直接了当的进行查看时间。
mysql中可以进行转换
select *,from_unixtime(regdate,’%Y-%m-%d %H:%i:%s’) as regtime from tax_common_member order by regdate asc;
这样,我们就可以直接了当的看到具体的数据时间。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/151921.html原文链接:https://javaforall.cn
边栏推荐
- 新手看过来,带你一次性了解“软考”
- JSON file of China's provincial boundaries
- Novice, let me show you the "soft test" at one time
- 腾讯云国际云服务器网络访问丢包问题解决办法
- [microservices sentinel] sentinel quick start | building an image | starting the console
- 百公里加速仅5.92秒,威兰达高性能版以高能产品实力领跑
- Scala IO read by character
- activity生命周期
- 2022 crane driver (limited to bridge crane) examination question bank simulated examination platform operation
- Thingsboard - rest API obtains and refreshes tokens
猜你喜欢

Practical operation notes - notebook plus memory and ash cleaning

QT(35)-操作EXCEL-QXlsx-QAxObject

Scala IO reads by lexical units and numbers

Custom animation (simulated win10 loading animation) - Optimization

Simulation questions and answers of the latest national fire facility operator (senior fire facility operator) in 2022

2022安全员-C证考试模拟100题及在线模拟考试

The basic principle and application of iterator and enhanced for

108页(4万字)未来公寓智能化设计平台项目方案建议书2022版

Text editor of QT project practice ---------- episode 11

大厂高频软件测试面试题和答案都帮你准备好啦,备战金九银十
随机推荐
Mobile security tool apktool
通过kubernetes可视化界面(rancher)安装kibana
Network request -volley
断言(assert)的用法
热力图展示相关矩阵
Punch smart spirit 1. The brand is attractive. What is the strength of the product?
If the order has not been paid for 30 minutes, it will be automatically cancelled. How can I achieve this?
实现mnist手写数字识别
Previous basic review (link)
Use of file class filenamefilter & filefilter in io
丹麦技术大学首创将量子计算应用于能源系统潮流建模
【Redis实现秒杀业务②】超卖问题的解决方案
Easy to wear - drop down radio
Mobile security tool jar
【无标题】
Source code analysis the problem that fragments cannot be displayed in the custom ViewGroup
Sanic服务启动失败
我想问一下兴业证券怎么开户?通过链接办理股票开户安全吗
Tiktok wallpaper applet v1.0.2 function, new arrival function
Activity startup process