Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?
Posted
Updated 11-Jan-12 21:51pm
v2
Comments
Dalek Dave 12-Jan-12 3:51am    
Edited for Grammar, Syntax and Readability.

This thread may help[^]


Or try this line of code...
HTML
CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(intMonth);
 
Share this answer
 
v2
Instead of passing just the month number you can pass the date . & then
C#
sDate='03/11/2009'

MonthName = sDate.ToString("MMMM")

It will Return 'November'
 
Share this answer
 
v2
Comments
Dalek Dave 12-Jan-12 3:57am    
Assuming they use that date format.
If they are American it would return "March".
VB
Dim strDate As New DateTime(1, monthNum, 2000) ' monthNum from oracle
strDate.ToString("MMM") 'month name
 
Share this answer
 
you can use this Query in Oracle back end

select to_char(sysdate,'MONTH') from dual;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900