当前位置:网站首页>Oracle date format exception: invalid number
Oracle date format exception: invalid number
2022-06-28 11:42:00 【Hello_ xzy_ Word】
Oracle Time format Invalid number
| Field name | type | remarks |
|---|---|---|
| flightDate | varchar | Format :yyyy-mm-dd hh24:mi:ss |
Query statement :
select TO_CHAR(xxx.flightDate,'hh24:mi') from xxx
Query results :
SELECT TO_CHAR(HANDOVER_TIME,'hh24:mi') FROM "T_DOA_FLIGHT_BIZ" WHERE HANDOVER_TIME IS NOT NULL > ORA-01722: Invalid number > Time : 0.026s
error analysis :
TO_CHAR Function official description
TO_CHAR(datetime) converts a datetime or interval value ofDATE,TIMESTAMP,TIMESTAMPWITHTIMEZONE, orTIMESTAMPWITHLOCALTIME``ZONEdatatype to a value ofVARCHAR2datatype in the format specified by the date formatfmt.TO_CHAR Function receive only receive not receive VARCHAR Data of type !
terms of settlement :
Use TO_DATE Function will VARCHAR Type of data to DATETIME type , And then use TO_CHAR.
select TO_CHAR(TO_DATE(xxx.flightDate,'yyyy-mm-dd hh24:mi:ss'),'hh24:mi') from xxx
summary

边栏推荐
- Day39 prototype chain and page Fireworks Effect 2021.10.13
- js中的class类模式及语法 2021.11.10
- 【sciter】: sciter-fs模块扫描文件API的使用及其注意细节
- Which programming language will attract excellent talents?
- Get current system date
- 来吧元宇宙,果然这热度一时半会儿过不去了
- Lihongyi, machine learning 7 Conclusion
- day39 原型链及页面烟花效果 2021.10.13
- 网页提示此站点不安全解决方案
- Day36 JS notes ecma6 syntax 2021.10.09
猜你喜欢

Fancy features and cheap prices! What is the true strength of Changan's new SUV?

Jetpack Compose Desktop 桌面版本的打包和发布应用

New listing of operation light 3.0 - a sincere work of self subversion across the times!
This Exception was thrown from a job compiled with Burst, which has limited exception support. report errors

Making and using of dynamic library (shared library)

Redis6 1: what problems can be solved by the introduction of NoSQL and redis?

如临现场的视觉感染力,NBA决赛直播还能这样看?

day39 原型鏈及頁面烟花效果 2021.10.13

Recommended practice sharing of Zhilian recruitment based on Nebula graph

Unity screenshot function
随机推荐
培训通知|2022年境外中资企业机构及人员疫情防控和安全防范专题培训通知
Day32 JS note event (Part 1) September 27, 2021
Characteristics of solar wireless LED display
js中的数组方法 2021.09.18
Random forest and poetry maker trained by AMR
【剑指Offer】49. 丑数
day33 js笔记 事件(下)2021.09.28
2022 开源软件安全状况报告:超41%的企业对开源安全没有足够的信心
Fancy features and cheap prices! What is the true strength of Changan's new SUV?
Adding a new user in MySQL 5.7
soapui的菜鸟教程
It is safer for individuals to choose which securities company to open an account for buying floor funds
windows 10下载安装mysql5.7
人人都可以参与开源!龙蜥社区最不容错过的开发者活动来了
mysql-.sql文件钓鱼上线
The default point of this in JS and how to modify it to 2021.11.09
GEE:基于 MCD64A1 的 GlobFire 日常火灾数据集
Day39 prototype chain and page Fireworks Effect 2021.10.13
Analyze whether there is duplicate data in the list and repeat it several times
Day24 JS notes 2021.09.15