title: How to change angular material datepicker format
body: <p>This is the format of date I am getting when I am using angular material datepicker....<code>Wed Nov 21 2018 00:00:00 GMT+0530 (India Standard Time)</code></p>
  
  <p>But I need date in <code>(YYYY-MM-DD)</code> or <code>(YYYY-MM-DDTHH:mm)</code> this format.</p>
  
  <p>this is model class I am using to capture data from angular material form</p>
  
  <pre><code>export class FlightSchedule {
  
      constructor(
          public destination: string,
          public origin: string,
          public date: string,
          public limit: string
      ) {}
  
  }
  </code></pre>
  
  <p>Please help me, I am unable to convert date in <code>YYYY-MM-DD</code> or <code>YYYY-MM-DDTHH:mm</code> format.  </p>
  
  <p>I am new to Angular</p>
  
  <p>Thanks in advance</p>