title: How do I store dates in Sencha Touch 2 Models
body: <p>In sencha touch 2, it appears there are only string, int, float, boolean data types. How then do I store a datetimes? </p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>OK, I found I can use <code>convert()</code> to convert values: <a href="http://docs.sencha.com/touch/2-0/#!/api/Ext.data.Types">http://docs.sencha.com/touch/2-0/#!/api/Ext.data.Types</a></p>
  
  <blockquote>
    <p><code>convert</code> : Function A function to convert raw data values from a data
    block into the data to be stored in the Field. The function is passed
    the collowing parameters:<br>
    - v : Mixed<br>
    The data value as read by the
    Reader, if undefined will use the configured defaultValue.<br>
    - rec : Mixed<br>
    The data object containing the row as read by the Reader. Depending on
    the Reader type, this could be an Array (ArrayReader), an object
    (JsonReader), or an XML element.</p>
  </blockquote>
  
  <pre><code>// Add a new Field data type which stores a VELatLong object in the Record.
  Ext.data.Types.VELATLONG = {
      convert: function(v, data) {
          return new VELatLong(data.lat, data.long);
      },
      sortType: function(v) {
          return v.Latitude;  // When sorting, order by latitude
      },
      type: 'VELatLong'
  };
  </code></pre>
  
  <p>But I do not really understand the code. For <code>convert()</code>, what sets the parameters? Why is the 1st param unused and when and what is it used for? How do I get/set such custom types (does it become <code>v</code> or <code>data</code> in <code>convert()</code>)? </p>