title: How do I store a date value from DatePicker into a formatted String value?
body: <p>During the signup process, I'm trying to implement a code that stores a date value into a string value in the following format: "dd-mm-yyyy". </p>
  
  <p>So, on the onCreate() method part, I declared a DatePicker variable as follows:</p>
  
  <pre><code>DatePicker dob = (DatePicker) findViewById(R.id.dob);
  </code></pre>
  
  <p>And on the onClick() method part, I wrote a code to convert this DatePicker value into the String.</p>
  
  <pre><code>String entered_dob = dob.toString();
  </code></pre>
  
  <p>But later when I opened the database I found out that this only returns a value which looks nonsense. How should I implement in order to get what I wanted?</p>