now date in c#.net convert MMddyyyyHHmmss i code example Example: C# datetime.now to string only numbers DateTime.Now.ToString("yyyyMMddHHmmss"); // case sensitive