当前位置:网站首页>【oracle】简单的日期时间的格式化与排序问题
【oracle】简单的日期时间的格式化与排序问题
2022-07-06 23:28:00 【kenwm】
所谓格式化日期指的是将日期转为字符串,或将字符串转为日期,下面几个函数可以用来格式化日期。
TO_CHAR(datetime, 'format')
TO_DATE(character, 'format')
TO_TIMESTAMP(character, 'format')
TO_TIMESTAMP_TZ(character, 'format')
例子
select to_char(a.CREATE_TIME,'yyyy-mm-dd') from students
select * from 表名 where 这里面可以加条件 ORDER BY 日期字段 desc,时间字段 desc
这个是写一个ORDER BY关键字根据日期字段排序然后加个逗号接着写时间字段排序
select to_char(a.CREATE_TIME,'yyyy-mm-dd') from students
where a.s_name like '%黄' order by a.create_time
边栏推荐
- EGR-20USCM接地故障继电器
- As we media, what websites are there to download video clips for free?
- Y58. Chapter III kubernetes from entry to proficiency - continuous integration and deployment (Sany)
- 3. Type of fund
- 【问道】编译原理
- 做自媒体,有哪些免费下载视频剪辑素材的网站?
- 【PHP SPL笔记】
- How can project managers counter attack with NPDP certificates? Look here
- 基于 hugging face 预训练模型的实体识别智能标注方案:生成doccano要求json格式
- Salesforce 容器化 ISV 场景下的软件供应链安全落地实践
猜你喜欢
随机推荐
第一篇论文的写作流程
做自媒体,有哪些免费下载视频剪辑素材的网站?
【js组件】date日期显示。
做自媒体视频剪辑,专业的人会怎么寻找背景音乐素材?
利用OPNET进行网络仿真时网络层协议(以QoS为例)的使用、配置及注意点
DFS,BFS以及图的遍历搜索
U++ game learning notes
Record a pressure measurement experience summary
Development thoughts of adding new requirements in secondary development
利用OPNET进行网络任意源组播(ASM)仿真的设计、配置及注意点
Window scheduled tasks
高数中值定理总结
基于Bevy游戏引擎和FPGA的双人游戏
Is PMP really useful?
Simulate thread communication
Dbsync adds support for mongodb and ES
DBSync新增对MongoDB、ES的支持
Harmonyos fourth training
QT simple layout box model with spring
最全常用高数公式









