jQuery Date formate

0

Add this function to your <script></script> and call from where ever you want in that <script></script>

<script>

window.alert(Getnow());

function GetNow(){
            var currentdate = new Date(); 
            var datetime = currentdate.getDate() + "-"
                    + (currentdate.getMonth()+1)  + "-" 
                    + currentdate.getFullYear() + " "  
                    + currentdate.getHours() + ":"  
                    + currentdate.getMinutes() + ":" 
                    + currentdate.getSeconds();
            return datetime;
        }
</script>