Oracle日期格式的空日期为00/00/0000 [英] Oracle Date Formatting Null date as 00/00/0000
本文介绍了Oracle日期格式的空日期为00/00/0000的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在Oracle SQL中将空日期格式设置为00/00/0000. 我正在使用NVL函数,但无法将00/00/0000识别为日期格式.
How can I format the Null Dates in my Oracle SQL to 00/00/0000. I am using NVL function but it doesn't recognize the 00/00/0000 as the date format.
Oracle SQL中是否有可用的日期格式,其将空日期的格式设置为00/00/0000
Is there any Date Formatting available in Oracle SQL which formats null date to 00/00/0000
推荐答案
首先执行to_char并将其包装在NVL中. 例如,
Do the to_char first and wrap it in the NVL. For example,
select nvl(to_char(null, 'DD-MM-YYYY'), '00-00-0000') from dual
这篇关于Oracle日期格式的空日期为00/00/0000的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文