当前位置:网站首页>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

边栏推荐
- windows 10下载安装mysql5.7
- Solve the problem of reading package listsdonebuilding dependency treereading state informationdone
- Day33 JS note event (Part 2) September 28, 2021
- day39 原型鏈及頁面烟花效果 2021.10.13
- Mysql使用max函数查询不到最大值
- day24 js笔记 2021.09.15
- 网页提示此站点不安全解决方案
- day28 严格模式、字符串 js 2021.09.22
- QML控件类型:TabBar
- 智联招聘基于 Nebula Graph 的推荐实践分享
猜你喜欢

Industry analysis - quick intercom, building intercom

科研丨Web of Science检索技巧

js中的数组方法 2021.09.18

Day33 JS note event (Part 2) September 28, 2021

day31 js笔记 DOM下 2021.09.26

Unity屏幕截图功能

水果FL Studio/Cubase/Studio one音乐宿主软件对比

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

2022中国信通院首届业务与应用安全发展论坛成功召开!

Practice and Thinking on the architecture of a set of 100000 TPS im integrated message system
随机推荐
Excel import / export convenience tool class
Making and using of static library
什么是主链系统?
使用API快捷创建ECS
ThreadLocal的简单理解
day31 js笔记 DOM下 2021.09.26
day23 js笔记 2021.09.14
Packaging and publishing application of jetpack compose desktop version
Contract quantification system development (construction explanation) - contract quantification system development (source code analysis and ready-made cases)
Training notice | special training notice on epidemic prevention and security prevention for overseas Chinese funded enterprises, institutions and personnel in 2022
Makefile introduction
Use logrotate to automatically cut the website logs of the pagoda
Day31 JS notes DOM 2021.09.26
Mysql使用max函数查询不到最大值
Basic 02: variable, remember the mobile number of the object
【剑指Offer】49. 丑数
Day30 JS notes BOM and DOM 2021.09.24
Convert the file URL in the browser to a file stream
合约量化交易系统开发 | 合约量化APP开发(现成案例)
SQL中的DQL、DML、DDL和DCL是怎么区分和定义的