.net - DateTime.ToString() display meridiem as "A.M." or "P.M." -
What time-value is it? Any method of using the toasting () method is to display as part of the "AM" part of the time. Instead of "AM"? I mask "TTA." But it only outputs "AA"
You AMDesignator
and define the characteristics of the PM digginator
culturefind.edetformat
, and then specify the culture as a format provider:
Using the system; Using System.Globalization; Classroom Program {Public Stable Zero Main () {CultureInfo c = (CultureInfo) CultureInfo.CurrentCulture.Clone (); C.DateTimeFormat.AMDesignator = "AM"; C.DateTimeFormat.PMDesignator = "P.M."; Console.WriteLine (DateTime.Now.ToString ("TT", c)); }}
Comments
Post a Comment