![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
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
Sortable ("s") Format Specifier in C#
The Sortable standard format specifier represents a custom date and time format string.
The format string is defined by the DateTimeFormatInfo.SortableDateTimePattern property.
The custom format string.
yyyy'-'MM'-'dd'T'HH':'mm':'ss
Example
using System; class Demo { static void Main() { DateTime date = new DateTime(2018, 9, 5, 2, 12, 40); Console.WriteLine(date.ToString("s")); } }
Output
2018-09-05T02:12:40
Advertisements