<script type="text/javascript"> var date = new Date();//Thu Jul 26 2012 15:59:09 GMT+0400 .. var a=date.toString().replace(/^[^\s]+\s([^\s]+)\s([^\s]+)\s([^\s]+)\s([^\s]+)\s.*$/ig,'$3-$1-$2 $4') alert(a) </script>