title: Convert datetime back to Windows 64-bit FILETIME
body: <p>I would like to create network timestamps in NT format.</p>
  
  <p>I've been able to convert them to readable time with this function:</p>
  
  <pre><code>NetworkStamp = "\xc0\x65\x31\x50\xde\x09\xd2\x01"
  
  def GetTime(NetworkStamp):
      Ftime = int(struct.unpack('&lt;Q',NetworkStamp)[0])
      Epoch = divmod(Ftime - 116444736000000000, 10000000)
      Actualtime = datetime.datetime.fromtimestamp(Epoch[0])
      return Actualtime, Actualtime.strftime('%Y-%m-%d %H:%M:%S')
  
  print GetTime(NetworkStamp)
  </code></pre>
  
  <p>Output:</p>
  
  <pre class="lang-none prettyprint-override"><code>(datetime.datetime(2016, 9, 8, 11, 35, 57), '2016-09-08 11:35:57')
  </code></pre>
  
  <p>Now I'd like to do the opposite, converting <code>'2016/09/08 11:35:57'</code> sec to this format:</p>
  
  <pre><code> "\xc0\x65\x31\x50\xde\x09\xd2\x01"
  </code></pre>