Hi,
I want to convert date in 'yyyy-mm-dd' format
following is my code
string currentYear = DateTime.Now.Year.ToString();
string Cmonth = DateTime.Now.ToString("MMMMMMMMM");
string smonth = DateTime.Now.Month.ToString();
string kk = currentYear + "-" + smonth + "-" + "01";
DateTime s = Convert.ToDateTime(kk);
when I execute above code Iam getting s as
6/1/2018 12:00:00 AM
my requirement is s should be
2018-06-01
how it is possible
Regards
Baiju