.Net C# Date and Time functions and Displaying the Month using a case statment.
//Note: Literal1 refers to a Literal Control that needs to be created on your form. protected void dateAndTime() { // Create a Time Object DateTime myTime = DateTime.Now; // Display the Year Literal1.Text = "The Year is: " + myTime.Year; // Display the Time Literal1.Text += "<br /> The Time is: "; Literal1.Text += myTime.Hour + ":" + myTime.Minute + ":" + myTime.Second; // Display the Month Literal1.Text += "<br /> The Month is: "; String thisMonth; thisMonth = getMonth(myTime.Month); // Call the Month Function Literal1.Text += myTime.Month + " (" + thisMonth + ")"; } String getMonth(int monthIn) { int caseSwitch = monthIn; string monthOut; switch (cas