
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Long Date ("D") Format Specifier in C#
The "D" format specifier represents a custom date and time format string.
The format string is defined by culture's DateTimeFormatInfo.LongDatePattern property.
The custom format string is −
dddd, dd MMMM yyyy
Example
using System; using System.Globalization; class Demo { static void Main() { DateTime myDate = new DateTime(2018, 9, 20); Console.WriteLine(myDate.ToString("D", CultureInfo.CreateSpecificCulture("en-US"))); } }
Output
Thursday, September 20, 2018
Advertisements