Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在显示开始时间 - 他们希望 AM / PM 为小写。在这段代码中,它是大写的。如何降低这个?
start = reh.START_DATE.Date; start = start.AddHours(reh.START_TIME.Hour); start = start.AddMinutes(reh.START_TIME.Minute);
考虑将其转换为字符串并调用 ToLower() 方法...
例如..
字符串时间 = start.ToString().ToLower();
如果您只希望 AM/PM 而不是小写日期,那么您可以使用
string date = string.Format("{0} {1}", start.Date, start.ToString("hh:mm tt").ToLower());