title: What data type should be used for timestamp in DynamoDB?
body: <p>I am new to DynamoDB. I wish to create a table which using DeviceID as the hash key, Timestamp as my range key and some data.</p>
  
  <pre><code>{ DeviceID: 123, Timestamp: "2016-11-11T17:21:07.5272333Z", X: 12, Y: 35 }
  </code></pre>
  
  <p>In SQL, we can use datetime type for Timestamp, but in DynamoDB there is none. </p>
  
  <ol>
  <li><p>What data type should I use? String? Number?<br>
  <a href="https://i.stack.imgur.com/DjTuN.png" rel="noreferrer"><img src="https://i.stack.imgur.com/DjTuN.png" alt="enter image description here"></a></p></li>
  <li><p>For the chosen data type, what kind of timestamp format should I write in? ISO format (e.g: 2016-11-11T17:21:07.5272333Z) or epoch time (e.g: 1478943038816)?  </p></li>
  <li><p>I need to search through the table through a range of time, e.g: 1/1/2015 10:00:00am until 31/12/2016 11:00:00pm</p></li>
  </ol>