Following syntax can be used to get month name from current date
4 letter format
DateTime.Now.ToString( "MMMM" )
3 letter format
DateTime.Now.ToString( "MMM" )
string CurrentMonth = String.Format("{0:MMMM}", DateTime.Now).ToString();
Click here for more custom DateTime format strings
No comments:
Post a Comment