Datetime format set C# code example
Example 1: csharp datetime string format
DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss")
Example 2: c# datetime format
string labelAttendanceTimestr = DateTime.Now.ToString("HH"+"mm");
DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss")
string labelAttendanceTimestr = DateTime.Now.ToString("HH"+"mm");