wrxdriven Posted November 5, 2003 Posted November 5, 2003 how do i format the month to go from a number like 1 to the jan abbreviation? Thanks Quote
Klogg Posted November 5, 2003 Posted November 5, 2003 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 Quote Take a look at my programs. Go to my web site.
*Experts* Nerseus Posted November 5, 2003 *Experts* Posted November 5, 2003 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 Quote "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
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.