The following Javascript example shows you how to manipulate the Date object.
<script language="JavaScript"> var x = new Date() var y = x.getFullYear() var m = x.getMonth()+1 // added +1 because javascript counts month from 0 var d = x.getDate() var h = x.getHours() var mi = x.getMinutes() var s = x.getSeconds() alert(y+'-'+m+'-'+d+' '+h+':'+mi+':'+s) </script>
Reference:

Good example… thanks.
LikeLike
Thanks =)
LikeLike