string date = string.Empty; date = DateTime.Now.ToString(); date = date.Split(' ')[0]; MessageBox.Show(date);
DateTime date1 = DateTime.Today; DateTime dateOnly = date1.Date; MessageBox.Show(dateOnly.ToString("d"));
Obj.TransDate = DateTime.Today.Date;
.Date
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)