I need to display dates in a month, a year (example: January 20, 2010).
Any suggestion?
var dt = new DateTime(2010, 20, 1); string s = dt.ToString("MMMM dd, yyyy");
See here for more details .
See this MSDN document. Contains all the information needed for custom date and time format strings.
http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
Probably worth the bookmarks as well, I always come back to it.
Use String.Format(formatspecifier)
String.Format(formatspecifier)
Custom Number Format Strings
Try DateField.ToString("MMMM-dd-yyyy");
DateField.ToString("MMMM-dd-yyyy");
Source: https://habr.com/ru/post/1309735/More articles:How to generate a treewithout recursive use with python or another language? - pythonHow to compress an MS Access database while the database is open using vba - vbaAre there any known problems with navigator.onLine on Android 2.1? - androidHow to parse xml in sql server to handle NULL value in DateTime DataType - sqlInverse kinematics processing: animation or math? - animationPerforming full-screen capture in windows - c ++When can we expect Core Java EE Patterns from SUN / Oracle, as we already have for J2EE? - java-eeHow to match Home / Action / id with action / id? - asp.net-mvcArray Intersection gives the wrong conclusion - arraysHow to unit test my project against different versions of an external dll api? - c #All Articles