I have a DatePicker in my activity. I want to store the selected date when the user clicks a button like this.
Date selectedDate=new Date(dp.getYear(), dp.getMonth(), dp.getDayOfMonth());
the problem is when the selected date is like today's: Feb 15 2010
the date returned from the
selectedDate
is 3910-02-15, so the year is 3910 instead of 2011
what is wrong with this ?
Thanks