date format in javascript dd mmm yyyy
date format in javascript dd mmm yyyy
<script type="text/javascript">
function todayDate(){
var d1=new Date();
var rr = d1.toString('yyyy-MM-dd');
a=rr.split(' ');
d=a[2]+'-'+a[1]+'-'+a[3];
//return d ;
alert(d);
}
</script>
<input type="button" name=" Check " onclick="todayDate()" value="click" />
<script type="text/javascript">
function todayDate(){
var d1=new Date();
var rr = d1.toString('yyyy-MM-dd');
a=rr.split(' ');
d=a[2]+'-'+a[1]+'-'+a[3];
//return d ;
alert(d);
}
</script>
<input type="button" name=" Check " onclick="todayDate()" value="click" />
Comments
Post a Comment
If you Satisfied , Please Leave a comment