title: python get time stamp on file in mm/dd/yyyy-HH:MM format
body: <p>I'm trying to get the datestamp on the file in mm-dd-yyyy-hh:mm format.</p>
  
  <pre><code>time.ctime(os.path.getmtime(file))
  </code></pre>
  
  <p>gives me detailed time stamp:</p>
  
  <pre><code>Fri Jun 07 16:54:31 2013
  </code></pre>
  
  <p>How can I display the output as:</p>
  
  <pre><code>06-07-2013-16:54
  </code></pre>
  
  <p>This is very similar to:
  <a href="https://stackoverflow.com/questions/16994696/python-get-time-stamp-on-file-in-mm-dd-yyyy-format">python get time stamp on file in mm/dd/yyyy format</a></p>
  
  <p>This is doing the half of what I want but I can't add hour and minute.</p>
  
  <pre><code>time.strftime('%m/%d/%Y', time.gmtime(os.path.getmtime(file)))
  </code></pre>