Convert System DateTime to specific format. eg:(yyyyMMdd hh:MM:ss)
<p>I have problem in converting system datetime format to specific format.</p>

<p>for eg: <code>DateTime dt=new DateTime();</code>// It will return 11/15/2016 10:23 AM as per my system format.</p>

<p>But I have to convert into this format-- <strong>20161115(yyyyMMdd hh:MM:ss)</strong>. I can able to achieve  this using `DateTime.Now.ToString("yyyyMMdd hh:MM:ss")? .</p>

<p>But its returning <strong>String</strong> format. I want in <strong>DateTime</strong> format.</p>