title: EXIFTOOL - Set datetime from filename
body: <p>I have many photos named with a date format but the EXIF dates don't match.</p>
  
  <p>e.g. <code>2016-12-16_20-20-29.jpg</code></p>
  
  <p>Running them through <code>EXIFTOOL</code> I can almost overwrite the dates but it doesn't match the exact date format.</p>
  
  <pre><code>exiftool "-datetimeoriginal&lt;filename" ./
  </code></pre>
  
  <p>This sets the date to the correct calendar day but ignores the time.</p>
  
  <pre><code>exiftool "-datetimeoriginal&lt;filename" -d "%Y-%M-%D_%H-%M-%S.%%e" ./
  </code></pre>
  
  <p>I believe the <code>-d</code> parameter sets a data format but this returns as error of <code>Warning: Error parsing time in ExifIFD:DateTimeOriginal (PrintConvInv)</code></p>
  
  <p>Is this the correct method to use?</p>