当前位置:网站首页>[Oracle] simple date and time formatting and sorting problem
[Oracle] simple date and time formatting and sorting problem
2022-07-07 05:23:00 【kenwm】
The so-called format date refers to converting the date into a string , Or convert the string to a date , The following functions can be used to format dates .
TO_CHAR(datetime, 'format')
TO_DATE(character, 'format')
TO_TIMESTAMP(character, 'format')
TO_TIMESTAMP_TZ(character, 'format')
Example
select to_char(a.CREATE_TIME,'yyyy-mm-dd') from students
select * from Table name where Conditions can be added to this ORDER BY Date fields desc, The time field desc
This is to write a ORDER BY Keywords are sorted according to the date field, then add a comma, and then write the time field to sort
select to_char(a.CREATE_TIME,'yyyy-mm-dd') from students
where a.s_name like '% yellow ' order by a.create_time
Oracle Format date
oracle Database about sorting by date and time
边栏推荐
猜你喜欢
随机推荐
精彩速递|腾讯云数据库6月刊
[PHP SPL notes]
Leetcode (417) -- Pacific Atlantic current problem
漏电继电器JD1-100
【问道】编译原理
U++ game learning notes
拿到PMP认证带来什么改变?
Under the trend of Micah, orebo and apple homekit, how does zhiting stand out?
[opencv] image morphological operation opencv marks the positions of different connected domains
Autowired注解用于List时的现象解析
Use Zhiyun reader to translate statistical genetics books
pmp真的有用吗?
Is it necessary to renew the PMP certificate?
LinkedBlockingQueue源码分析-初始化
SQL injection - secondary injection and multi statement injection
JVM(二十) -- 性能监控与调优(一) -- 概述
CentOS 7.9 installing Oracle 21C Adventures
线程池的创建与使用
局部变量的数组初始化问题
利用OPNET进行网络指定源组播(SSM)仿真的设计、配置及注意点