当前位置:网站首页>【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
边栏推荐
- PMP证书有没有必要续期?
- 2039: [Bluebridge cup 2022 preliminaries] Li Bai's enhanced version (dynamic planning)
- 做自媒体视频剪辑,专业的人会怎么寻找背景音乐素材?
- Auto. JS get all app names of mobile phones
- QT simple layout box model with spring
- 数字化创新驱动指南
- Weebly mobile website editor mobile browsing New Era
- How can project managers counter attack with NPDP certificates? Look here
- 照片选择器CollectionView
- 人体传感器好不好用?怎么用?Aqara绿米、小米之间到底买哪个
猜你喜欢
[email protected] Mapping relatio"/>Why JSON is used for calls between interfaces, how fastjson is assigned, fastjson 1.2 [email protected] Mapping relatio

【js组件】自定义select

SQL injection - secondary injection and multi statement injection

基于 hugging face 预训练模型的实体识别智能标注方案:生成doccano要求json格式

window定时计划任务

《2》 Label

全链路压测:影子库与影子表之争

qt 简单布局 盒子模型 加弹簧

Is the human body sensor easy to use? How to use it? Which do you buy between aqara green rice and Xiaomi

Techniques d'utilisation de sublime
随机推荐
How can project managers counter attack with NPDP certificates? Look here
If you‘re running pod install manually, make sure flutter pub get is executed first.
Dbsync adds support for mongodb and ES
Vector and class copy constructors
与利润无关的背包问题(深度优先搜索)
高压漏电继电器BLD-20
Simulate thread communication
Timer create timer
pmp真的有用吗?
JHOK-ZBL1漏电继电器
模拟线程通信
DBSync新增对MongoDB、ES的支持
torch optimizer小解析
高级程序员必知必会,一文详解MySQL主从同步原理,推荐收藏
Let f (x) = Σ x^n/n^2, prove that f (x) + F (1-x) + lnxln (1-x) = Σ 1/n^2
利用OPNET进行网络指定源组播(SSM)仿真的设计、配置及注意点
全链路压测:影子库与影子表之争
The execution order of return in JS' try catch finally
漏电继电器JOLX-GS62零序孔径Φ100
QT控件样式系列(一)之QSlider