spicymango
Programmer
Hi,
I want to subtract 12 months from the current date and get the result in this format(6/26/2008).
How can i do that following gives me date in different format. I will appreciate your help.
I want to subtract 12 months from the current date and get the result in this format(6/26/2008).
How can i do that following gives me date in different format. I will appreciate your help.
Code:
<script>
var today =new Date();
var ten_days_ago=new Date().setDate(today.getDate()-365);
var startDate= new Date(ten_days_ago);
alert(startDate);
</script>