title: Converting timestamp from binary to hex
body: <p>I'm trying to create a report from a proprietary ERP database. I've set up an ODBC connection and am using PHP to pull data from the database.</p>
  
  <p>If I use Microsoft SQL Server Management Studio I can see that a row has a TimeStamp field (string type) with a value of 0x00000000093E7FCA, which apparently corresponds to 2011-02-04. (All fields in this table are string type. No idea why. Seems lazy.)</p>
  
  <p>If I do a var_dump of the returned ODBC object I get:</p>
  
  <pre><code>public 'TimeStamp' =&gt; string '����  &gt;Â' (length=8)
  </code></pre>
  
  <p>How do I convert this string value to its hexadecimal equivalent (in this case 0x00000000093E7FCA) using PHP?</p>
  
  <p>I have tried:</p>
  
  <pre><code>$row-&gt;TimeStamp + 0; // '0' ...nope.
  (binary)$row-&gt;TimeStamp; // '����   &gt;Â' ...close!
  (int)((binary)$row-&gt;TimeStamp); // '0' ...doh!
  </code></pre>