title: Trying to get hours and minutes of a date in IONIC : getHours is not a function
body: <p>I am trying to get the hours and the minutes of a date in ionic and got an error. </p>
  
  <p>here is my code from the .html file : </p>
  
  <pre><code>  &lt;ion-datetime displayFormat="HH:mm" [(ngModel)]='timeEntered1' picker-format="h:mm"&gt;&lt;/ion-datetime&gt;
    &lt;ion-button (click)="getTime()"&gt;&lt;/ion-button&gt;
  </code></pre>
  
  <p>Then inside my .ts file I have this : </p>
  
  <pre><code>timeEntered1 = new Date();
  
  constructor() {}
  
  getTime() {
    console.log(this.timeEntered1.getHours());
  }
  </code></pre>
  
  <p>and my error is : </p>
  
  <blockquote>
    <p>this.timeEntered1.getHours is not a function</p>
  </blockquote>