C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » VB.NET Syntax »

VB.NET Code to get the month name by passing the month value as integer from 1 to 12


Posted Date: 31 Oct 2008    Resource Type: Code Snippets    Category: VB.NET Syntax
Author: santanu patraMember Level: Silver    
Rating: 1 out of 5Points: 10



The following sample VB.NET code demonstrates how to get a month name if month value is passed as integer from 1 to 12.

Private Function GetMonthName(ByVal monthNum As Integer) As String
Try
Dim strDate As New DateTime(1, monthNum, 1)
Return strDate.ToString("MMM")

Catch ex As Exception

End Try
End Function




Responses

Author: Rahul    09 Feb 2009Member Level: Silver   Points : 1
Hey Shantanu Thanks friend for submitting this function,it helps me very well..Thanks

Regards
Rahul


Author: Sasikumar    18 Feb 2009Member Level: Gold   Points : 0
Hi,

This above function works fine for me,

Thanks,
Sasikumar


Author: Babu Kumarasamy    05 Jun 2009Member Level: Gold   Points : 1
There is already an inbuilt function

http://www.plus2net.com/asp-tutorial/date-month.php


Author: Babu Kumarasamy    05 Jun 2009Member Level: Gold   Points : 1
There is already an inbuilt function

http://www.plus2net.com/asp-tutorial/date-month.php


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
VB.NET code to get month name if month is passed as integer  .     .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Getting the current User's Name in vb.net
Previous Resource: Handling Strings
Return to Discussion Resource Index
Post New Resource
Category: VB.NET Syntax


Post resources and earn money!
 
Related Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use