title: Unable to retrieve time parameters from TimePicker
body: <p>I have a DatePicker and TimePicker. I am able to retrieve all the Date parameter values successfully. Whereas I'm getting error when I try the same with TimePicker the line shows error "Add cast to timepicker". Is there anything wrong in what I'm doing?</p>
  
  <pre><code>datepicker = (DatePicker) findViewById(R.id.pickerdate); 
  timepicker = (TimePicker) findViewById(R.id.pickertime);
  
  DateStr = datepicker.getDayOfMonth() + "/"
                  + (datepicker.getMonth() + 1) + "/" + datepicker.getYear();
  
  TimeStr = timepicker.getHourOfDay() + " : " + timepicker.getminute();
  </code></pre>