Here is the code I am using below
string Time = DateTime.Now.ToString("MM/dd/yy h:mm tt");
The above tt will give me AM or PM but I need am or pm. Is there a different way to write this to get am or pm in C#? I have tried TT,t leaving it out completely but all end in failure.
CodePudding user response:
DateTime.Now.ToString("MM/dd/yy h:mm tt").ToLower();