Timestamp a Variable being returned
<p>I am a little slow when it comes to jQuery as I am trying to get some footing in this language. I am currently working with FaceAPI and I have it working beautifully. During the recognize phase I have a Ajax call that returns an array of info. </p>

<pre><code>$.ajax({
                 url: 'http://api.face.com/faces/recognize.json?&amp;uids=all&amp;namespace=camera_app&amp;detector=Aggressive&amp;',
                 data: formdata,
                 cache: false,
                 contentType: false,
                 processData: false,
                 dataType:"json",
                 type: 'POST',
                 success: function (data) {
                     photo = data.photos[0];
                     handleResult(photo)
                 },
</code></pre>

<p>But what I am most interested in is the "UIDs" that are called the API matches a person's face to their UID. What I want to know is once a UID is returned can a timestamp be placed and saved to my Database that I have setup? [Sidenote: Users photos are only submitted to the API, I do not save them on my database. Only thing I am saving is the users first/last name and UID.] I just don't know how the timestamp function would work with a returning variable. </p>

<p>I want to be able to pull up at a later date the UID and timestamp matching when that information was returned.</p>

<p>Update:</p>

<p>Here is where the UID and Accuracy (confidence) is displayed to the user:</p>

<pre><code>function handleResult(photo) {
    console.log(photo)
    var s = "&lt;h2 class='results'&gt;Account Information:&lt;/h2&gt;";
    if(photo.tags.length) {
      var tag = photo.tags[0].uids[0];
      s += "&lt;p&gt;";
     //$('#result') .html ('Welcome Back:' + photo.uid + ',' + 'Confidence:' + photo.confidence);
     if(tag.uid) s += "&lt;li&gt; User:" + tag.uid + "&lt;/li&gt;";
     if(tag.uid) s += "&lt;li&gt; Accuracy:" + tag.confidence + "%" + "&lt;/li&gt;";
     if(tag.uid == 0) s += "I got something, but the data wasn't clear. Sorry.";
      } else {
        s += "&lt;p&gt;Sorry, I didn't find any faces.&lt;/p&gt;";
      }
      $("#result").html(s);
</code></pre>

<p>At this stage I would like a timestamp to be created.</p>

<p>SOLVED: </p>

<pre><code>function handleResult(photo) {
    console.log(photo)
    var s = "&lt;h2 class='results'&gt;Account Information:&lt;/h2&gt;";
    var month = new Date().getMonth() + 1;
    var day = new Date().getDate();
    var hours = new Date().getHours();
    var min = new Date().getMinutes();
    var suffix = "AM";
    if (hours &gt;= 12) {
    suffix = "PM";
    hours = hours - 12;
    }
    if (hours == 0) {
    hours = 12;
    }
    if (min &lt; 10)
    min = "0" + min

    if(photo.tags.length) {
      var tag = photo.tags[0].uids[0];
      s += "&lt;p&gt;";
     //$('#result') .html ('Welcome Back:' + photo.uid + ',' + 'Confidence:' + photo.confidence);
     if(tag.uid) s += "&lt;li&gt; User:" + tag.uid + "&lt;/li&gt;";
     if(tag.uid) s += "&lt;li&gt; Accuracy:" + tag.confidence + "%" + "&lt;/li&gt;";
     if(tag.uid) s += "&lt;li&gt; Timestamp:" + month + "/" + day + "&amp;nbsp;" +  hours + ":" + min + suffix + "&lt;/li&gt;";
     if(tag.uid == 0) s += "I got something, but the data wasn't clear. Sorry.";

      } else {
        s += "&lt;p&gt;Sorry, I didn't find any faces.&lt;/p&gt;";
      }
      $("#result").html(s);
</code></pre>
