title: How to retrieve latest record from Azure table storage using JavaScript?
body: <p><a href="https://i.stack.imgur.com/fznsj.png" rel="nofollow noreferrer">Image shows the azure table</a>How to retrieve latest record from Azure table storage using JavaScript?</p>
  
  <p>I saw the article,
  <a href="https://stackoverflow.com/questions/40593939/how-to-retrieve-latest-record-using-rowkey-or-timestamp-in-azure-table-storage">How to retrieve latest record using RowKey or Timestamp in Azure Table storage</a></p>
  
  <p>but i want to implement the same in Nodejs server side, Any suggestion.
  code so far,</p>
  
  <pre><code> var dt = Date().toLocaleString();
        console.log("Got response: " + dt);
  
          var entGen = azure.TableUtilities.entityGenerator;
        var task = {
          PartitionKey: entGen.String('ConfigData'),
          RowKey: dt,
          DeviceId: entGen.String(req.body.devId),
        };
  
        // Insert the entity to the table
        tableSvc.insertEntity('configurationData', task, function (error, result, response) {
          if (!error) {
            // Entity inserted
            console.log("Added the data in table successfully");
          }
          else{
            console.log(error);
          }
        });
  </code></pre>
  
  <p>I got below error,</p>
  
  <pre><code>name: 'StorageError',
    message: 'The \'RowKey\' parameter of value \'11/21/2017, 8:17:24 AM\' is out of range.\nRequestId:687de370-0002-0055-09a1-62d5e1000000\nTime:2017-11-21T08:17:25.6350503Z',
    code: 'OutOfRangeInput',
    statusCode: 400,
    requestId: '687de370-0002-0055-09a1-62d5e1000000' }
  </code></pre>
  
  <p>Thanks in advance.</p>