c# datetime.now day month year code example
Example 1: csharp datetime string format
DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss")
Example 2: get day month year from date c#
// can add : or / to seperate dates and time
DateTime.Now.ToString("yyyyMMddhhmmss")