title: c# how to convert a datetime to byte array of 4 bytes
body: <p>I tried converting it to byte array, but a minimum byte array of 5 is created.
  But I have only 4 bytes only for this date time to stored as byte in my array of byte.</p>
  <p>code is like this:</p>
  <pre><code>byte[] b = new byte[] {10,12,12,12};
  DATETIME t=datetime.now();
  array.copy(BitConverter.GetBytes(t.ticks),1,b,4);
  </code></pre>
  <p>but <code>getbytes(t.ticks)</code> returns array of 8 bytes. I somehow want it to convert to 4 bytes only.</p>