
- C# Basic Tutorial
- C# - Home
- C# - Overview
- C# - Environment
- C# - Program Structure
- C# - Basic Syntax
- C# - Data Types
- C# - Type Conversion
- C# - Variables
- C# - Constants
- C# - Operators
- C# - Decision Making
- C# - Loops
- C# - Encapsulation
- C# - Methods
- C# - Nullables
- C# - Arrays
- C# - Strings
- C# - Structure
- C# - Enums
- C# - Classes
- C# - Inheritance
- C# - Polymorphism
- C# - Operator Overloading
- C# - Interfaces
- C# - Namespaces
- C# - Preprocessor Directives
- C# - Regular Expressions
- C# - Exception Handling
- C# - File I/O
- C# Advanced Tutorial
- C# - Attributes
- C# - Reflection
- C# - Properties
- C# - Indexers
- C# - Delegates
- C# - Events
- C# - Collections
- C# - Generics
- C# - Anonymous Methods
- C# - Unsafe Codes
- C# - Multithreading
- C# Useful Resources
- C# - Questions and Answers
- C# - Quick Guide
- C# - Useful Resources
- C# - Discussion
Month ("M", "m") Format Specifier in C#
The Month standard format specifier represents a custom date and time format string.
The format string is defined by the current DateTimeFormatInfo.MonthDayPattern property.
The custom format string −
MMMM dd
Example
using System; using System.Globalization; class Demo { static void Main() { DateTime date = new DateTime(2018, 6, 11, 9, 15, 0); Console.WriteLine(date.ToString("m", CultureInfo.CreateSpecificCulture("en-us"))); } }
Output
June 11
- Related Articles
- Format Month in M format in Java
- Year Month ("Y") Format Specifier in C#
- Formatting Minute in m format in Java
- Sortable ("s") Format Specifier in C#
- Precision String Format Specifier In Swift
- C# Hexadecimal ("X") Format Specifier
- C# Exponential (“E”) Format Specifier
- C# Percent ("P") Format Specifier
- Short Date ("d") Format Specifier
- C# Currency ("C") Format Specifier
- C# Numeric (“N”) Format Specifier
- C# Decimal ("D") Format Specifier
- Display the month number with SimpleDateFormat(“M”) in Java
- Format Specifier for Hash Code in Java
- Short Time ("t") Format Specifier in C#

Advertisements