c# get date and time now code example
Example 1: c# get current date
DateTime now = DateTime.Now;
Example 2: c# get date
DateTime.Now.ToString("dd/MM/yyyy");
Example 3: c# datetime current
DateTime now = DateTime.Now;
string strDate = now.ToString("YYYY-MM-dd");