title: DateTime format VB.NET
body: <p>I have a text file, which i had extracted the date and time. I need it to be this way</p>
  
  <blockquote>
    <p>yyyy MM dd HH mm</p>
  </blockquote>
  
  <p>how can i make it into this format.</p>
  
  <p>I tried </p>
  
  <pre><code>dim date as DateTime = line.Substring(line.Length - 19, 16)
  date= DateTime.ParseExact(date, "yyyy MM dd HH mm", CultureInfo.InvariantCulture)
  </code></pre>
  
  <p>it gave an error</p>