My brain is not functioning well right now XD and I want some help....
The thing is, I want to get the date and add to my ajax.post. I have a code here for my time&date format... What is the best way to make it?

js Time&date format

```
var my_date_format = function(){
    var d = new Date();
    var month = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
    var date = d.getDate() + " " + month[d.getMonth()] + ", " + d.getFullYear();
    var time = d.toLocaleTimeString().toLowerCase().replace(/([\d]+:[\d]+):[\d]+(\s\w+)/g, "$1$2");
    return (date + " " + time);  
};

console.log(my_date_format("2015-07-12 11:28:13"));
// output sample 13 Dec, 2015 1:38 pm

```

html

```
<form id="member" method="post" action="../php/connect.php">
                <fieldset style="width:400; border-width:6px;" align="center"   >
            <legend><h3>Member Log</h3><br><br></legend>
                <p id="get_member"></p>

             <input class="fname" type='text' name='firstname' id='firstname' placeholder="First Name" required/>

            </br><input class="lname" type='text' name='lastname' id='lastname' placeholder="Last Name" required /></br>

            </br><label for="male">Male  </label><input type="radio" name="gender" id="male" required value="Male" />
                 <label for="female">Female  </label><input type="radio" name="gender" id="female" value="Female" /><br />

            <br><br><input class="submit" type="submit" name="submit">
        </fieldset>
            </form>

```

jquery ajax post

```
<script type="text/javascript">

        $(document).ready(function(){
         $('#member').submit(function(){

                  $.ajax({
                           data: $(this).serialize(),
                           type: $(this).attr('method'),
                           url: $(this).attr('action'),
                           success: function(data){
                                    $('#get_member').html(data);
                            }

                  });

                  $("#member")[0].reset();
                event.preventDefault();
         });

});﻿

    </script>

```