需要帮助,将格式为20120130的日期转换为Date数据类型oracle sql [英] Need help converting date in format 20120130 to Date data type oracle sql
本文介绍了需要帮助,将格式为20120130的日期转换为Date数据类型oracle sql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您能否帮助我在Orcle Sql中将日期从"20120101"格式转换为DATE格式.
Could you please help me in converting date from the format "20120101" to DATE format in Orcle Sql.
我查看了此链接,但未提及日期格式是否为自定义..
I looked at this link but it does not mention if the date format is custom..
是否可以将任何排除规则写入转换函数?
Is it possible to write any exclusion rule to the conversion function?
类似"99999999"到"9999-12-31"?有可能吗?
something like this "99999999" to "9999-12-31"? Is it possible?
推荐答案
SELECT to_date('20120101','YYYYMMDD') FROM dual;
这篇关于需要帮助,将格式为20120130的日期转换为Date数据类型oracle sql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文