oracle 如何从月份数字显示月份名称
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13230750/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 01:14:01 来源:igfitidea点击:
How to display Month Names from month numbers
提问by Taoqir
Now i am in a condition, Where I am just displaying the month names and some data grouped by month number. There is a small issue. I need to get month names instead of month numbers from Oracle.
现在我处于一种状态,我只显示月份名称和一些按月份编号分组的数据。有一个小问题。我需要从 Oracle 获取月份名称而不是月份编号。
回答by Joe G Joseph
try this:
尝试这个:
SELECT TO_CHAR(TO_DATE(11, 'MM'), 'MONTH') FROM DUAL;
result:
结果:
NOVEMBER
SQL fiddle demo
SQL小提琴演示
回答by user1819920
This can be resolve your problem
这可以解决您的问题
SELECT TO_CHAR(TO_DATE(1, 'MM'), 'MON') FROM DUAL;
回答by TechDo
How about this:
这个怎么样:
SELECT TO_CHAR(SYSDATE, 'Month') FROM DUAL;