Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I don't know if there's an easier way, but you could use a selection structure to do it. For instance, if the number was in a text box called TextBox:

 

Select Case Me.TextBox.Text
     Case "1"
           Me.TextBox.Text = "Jan."
     Case "2"
           Me.TextBox.Text = "Feb."
     'continue doing this for each month
End Select

Take a look at my programs. Go to my web site.
  • *Experts*
Posted

Or use the MonthNames array:

for(int i=0; i<12; i++)
   Debug.WriteLine(System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.MonthNames[i]);

You can also get the abbreviations using AbbreviatedMonthNames.

 

-Nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...