how do i format month abbreviation

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:

Visual Basic:
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
 
Or use the MonthNames array:
C#:
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
 
Back
Top