datetime format strings c# code example
Example 1: csharp datetime string format
DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss")
Example 2: c# datetime format ymd
Use DateTime.Now.ToString("yyyy-MM-dd h:mm tt");
DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss")
Use DateTime.Now.ToString("yyyy-MM-dd h:mm tt");