ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2017 www.aspforums.com. All rights reserved.Error: 'String was not recognized as a valid DateTime format dd/MM/yyyy' in ASP.Net MVCHi @GuruLogu,<br />Please try the following<br /><br /><a href = 'link(Threads/145876/Convert-ddmmyyyy-format-string-to-DateTime-in-c-Net/)'>Convert dd/mm/yyyy format string to DateTime in c# .Net</a><br /><br />It might help you.<br /><br />Cheers Andrea.http://www.aspforums.net/Threads/168166/Error-String-was-not-recognized-as-a-valid-DateTime-format-ddMMyyyy-in-ASPNet-MVC/http://www.aspforums.net/Threads/168166/Error-String-was-not-recognized-as-a-valid-DateTime-format-ddMMyyyy-in-ASPNet-MVC/Thu, 24 Nov 2016 01:22:20 GMTError: 'String was not recognized as a valid DateTime format dd/MM/yyyy' in ASP.Net MVC<p>Thanks Andrea!</p> <p>But I need in MVC</p>http://www.aspforums.net/Threads/168166/Error-String-was-not-recognized-as-a-valid-DateTime-format-ddMMyyyy-in-ASPNet-MVC/http://www.aspforums.net/Threads/168166/Error-String-was-not-recognized-as-a-valid-DateTime-format-ddMMyyyy-in-ASPNet-MVC/Thu, 24 Nov 2016 01:30:24 GMTError: 'String was not recognized as a valid DateTime format dd/MM/yyyy' in ASP.Net MVC<p>Hi <a class="username" rel="GuruLogu">GuruLogu</a>,</p> <p>Refer the below code.</p> <pre class="brush: csharp">string dateString = DateTime.Now.ToShortDateString() + &#34; &#34; + DateTime.Now.ToShortTimeString(); DateTime dt = new DateTime(); string result; try { &nbsp;&nbsp;&nbsp; result = Convert.ToDateTime(dateString).ToString(&#34;MM/dd/yyyy HH:mm tt&#34;, CultureInfo.InvariantCulture); &nbsp;&nbsp;&nbsp; dt = Convert.ToDateTime(result); } catch (FormatException) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; }</pre> <p>&nbsp;</p>http://www.aspforums.net/Threads/168166/Error-String-was-not-recognized-as-a-valid-DateTime-format-ddMMyyyy-in-ASPNet-MVC/http://www.aspforums.net/Threads/168166/Error-String-was-not-recognized-as-a-valid-DateTime-format-ddMMyyyy-in-ASPNet-MVC/Thu, 24 Nov 2016 03:36:03 GMT