datetime.tostring( ) formats examples Example: csharp datetime string format DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss")