title: How to render DateTime in format DD/MM/YYYYTHH:mm ASP.NET CORE 5.0 MVC
body: <p>I am trying to render <code>DateTime</code> in format  <code>DD/MM/YYYYTHH:mm</code> in <code>C# ASP.NET CORE 5.0 MVC</code> but I am not sure is it good idea to render in backend side or in frontend. Since in frontend side I use <code>DataTable</code>
  Currently this is format which I get in my <code>datatable</code></p>
  <pre><code>2021-03-05T13:22:48.3190414  
  </code></pre>
  <p>But I want to be formated as</p>
  <pre><code>05-03-2021T13:22
  </code></pre>
  <p>I try couple of solution something like in datatable</p>
  <pre><code>{
                  &quot;data&quot;: &quot;dateAndTime&quot;, &quot;width&quot;: &quot;15%&quot;,
                  &quot;def&quot;: function () { return new Date(); },
                  &quot;displayFormat&quot;: 'DD/MM/YYYY',
                  &quot;wireFormat&quot;: 'YYYY-MM-DD',
                  &quot;keyInput&quot;: false
              },
  
   [Display(Name = &quot;Datum i vrijeme slanja&quot;)]
          public DateTime DateAndTime { get; set; } = DateTime.Now;
  </code></pre>
  <p>Also in backend I try something like this:</p>
  <pre><code>ticketVM.Ticket.DateAndTime = DateTime.Parse(&quot;DD/MM/YYYY&quot;);
  </code></pre>
  <p>And get this kind of error</p>
  <pre><code>The string 'DD/MM/YYYY' was not recognized as a valid DateTime. There is an unknown word starting at index '0'.
  </code></pre>
  <p>Any advice and suggestion how to get format render in format DD/MM/YYYYTHH:mm ??</p>