title: Casting and getting values from date picker and time picker in android
body: <p>I have a <code>DatePicker</code> and a <code>TimePicker</code> in my app. Can anyone tell me how to get the values of the date and time that are selected??? What i mean to say is, for <code>EditText</code> we can declare as </p>
  
  <pre><code>final EditText name = (EditText) this.findViewById(R.id.nametext);
  </code></pre>
  
  <p>and we can cast the data of it by using <code>name.getText().toString()</code>.</p>
  
  <p>So similarly how can we get the values of DatePicker and TimePicker to a String???</p>