I am trying to convert DateTime format to yyyy-MM-dd format and store it to DateTime object. But it gives me the System DateTime
DateTime
yyyy-MM-dd
Use DateTime.Now.ToString("yyyy-MM-dd h:mm tt");. See this.
DateTime.Now.ToString("yyyy-MM-dd h:mm tt");