当前位置:网站首页>[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
边栏推荐
- 痛心啊 收到教训了
- PMP证书有没有必要续期?
- Operand of null-aware operation ‘!‘ has type ‘SchedulerBinding‘ which excludes null.
- Two methods of thread synchronization
- Use Zhiyun reader to translate statistical genetics books
- Array initialization of local variables
- Phenomenon analysis when Autowired annotation is used for list
- Salesforce 容器化 ISV 场景下的软件供应链安全落地实践
- K6EL-100漏电继电器
- 最长公共子序列(LCS)(动态规划,递归)
猜你喜欢
随机推荐
pmp真的有用吗?
EGR-20USCM接地故障继电器
c语言神经网络基本代码大全及其含义
【js组件】date日期显示。
A cool "ghost" console tool
[optimal web page width and its implementation] [recommended collection "
模拟线程通信
Creation and use of thread pool
The execution order of return in JS' try catch finally
实现网页内容可编辑
利用OPNET进行网络指定源组播(SSM)仿真的设计、配置及注意点
Longest common subsequence (LCS) (dynamic programming, recursive)
app clear data源码追踪
高压漏电继电器BLD-20
pytest测试框架——数据驱动
精彩速递|腾讯云数据库6月刊
JVM(二十) -- 性能监控与调优(一) -- 概述
【PHP SPL笔记】
JVM(十九) -- 字节码与类的加载(四) -- 再谈类的加载器
Salesforce 容器化 ISV 场景下的软件供应链安全落地实践