Nov 4, 2003 #1 W wrxdriven Newcomer Joined Sep 23, 2003 Messages 16 how do i format the month to go from a number like 1 to the jan abbreviation? Thanks
Nov 4, 2003 #2 K Klogg Centurion Joined Oct 7, 2003 Messages 104 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
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
Nov 5, 2003 #3 N Nerseus Danner Joined Oct 22, 2002 Messages 2,547 Location Arizona, USA 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
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