title: Inserting float in DynamoDB with PHP
body: <p>I'm in the process of a shift from MongoDB to DynamoDB and one of the challenges I still haven't found a solution to, is inserting floats.</p>
  
  <p>I'm trying to do something like this:</p>
  
  <pre><code>list($usec, $sec) = explode(" ", microtime()); 
  $timestamp = (float)$usec + (float)$sec; //1379914632.0291
  $array_to_insert = array('system_insert_time' =&gt; array('N' =&gt; $timestamp));
  </code></pre>
  
  <p>I'm getting an exception like this:</p>
  
  <pre><code>Validation errors: [Item][system_insert_time][N] must be of type string
  </code></pre>
  
  <p>The field in the database is defined as a Number. It's working fine if I'm trying to insert integers. But I need more accuracy than seconds. Inserting as a string doesn't work, because I want  to be able to get database entries greater than a specific timestamp.</p>
  
  <p>Any help is greatly appreciated! Thanks.</p>