Search This Blog

Friday, January 17, 2014

Get Full Month Name in string from Date

Get Full Month Name in string from Date


public static string GetMonthName(DateTime YourDate)
        {
            var formatDate = new DateTimeFormatInfo();
            string[] Month_Name = formatDate.MonthNames;
            return Month_Name [YourDate.Month - 1];
        }

For use this import System.Globalization NameSpace

No comments: