Hi, I have to substract 1 Month from the Date object, iam currently using the SetTime() method of date object as follows, but its giving some abnormal result by adding few days instead of substracting. ------------------------------------------------------- var date:Date = new Date(); var monthSpan:int = 1000 * 60 * 60 * 24 * 30; this.esView.toDateE.text = date.toDateString(); date.setTime(date.getTime() - monthSpan); this.esView.fromDateE.text = date.toDateString(); --------------------------------------------------------
the result in the fromDate TextBox should be one month previous date as compared to the current date. but it doesnt, any idea? ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs