title: Best way to Pass Typescript Date property as a parameter to a Web Api 2.0 method
body: <p>I have a date picker in html which is bound to a Date property of an employee.</p>
  
  <p>ex: i have selected the date as "Thu Feb 22 2018 00:00:00 GMT+0530 (India Standard Time)".this is the value i get when i log in console.</p>
  
  <p>But when i tried to debug in C# the value is changed.
  {21-02-2018 18:30:00}</p>
  
  <p>How to handle or work with the typescript date object when passing it to a API method and displaying it back</p>
  
  <p>My typescript Model </p>
  
  <pre><code>export class Visitor {
      public id: number;
      public firstname: string;
      public lastname: string;
      public dob: Date;
      public genderId: number;
      public age: number;
  }
  </code></pre>
  
  <p>and C# model </p>
  
  <pre><code> public class Visitor
      {
          public int Id { get; set; }
  
          public string Lastname { get; set; }
          public string Firstname { get; set; }
          public int Age { get; set; }
  
  
          public DateTime DOB { get; set; }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/QMBkw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QMBkw.png" alt="enter image description here"></a></p>