显示月份名称 [英] to display name of the month
本文介绍了显示月份名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
朋友们,
我正在从后端(oracle)获取月份号,并且需要在asp.net页中显示为名称.
Hi friends,
I''m getting the number of the month from the back end (oracle) and I need to display in the asp.net page as names.
How do I do it?
推荐答案
^ ]
或尝试以下代码...
This thread may help[^]
Or try this line of code...
CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(intMonth);
您不仅可以传递月份号,还可以传递日期. &然后
Instead of passing just the month number you can pass the date . & then
sDate='03/11/2009'
MonthName = sDate.ToString("MMMM")
It will Return 'November'
Dim strDate As New DateTime(1, monthNum, 2000) ' monthNum from oracle
strDate.ToString("MMM") 'month name
这篇关于显示月份名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文