- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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
Advertisements