title: Get C# DateTime Ticks from html <Input> of type DateTime
body: <p>I was hoping one of you guys might be able to help me. I am a bit stuck and I am very new to javascript. </p>
  
  <p>I need to post a DateTime value (as c# ticks) to a webservice call from a mobile application. The mobile application is written in html/javascript. </p>
  
  <p>Currently I have code that works for a normal Date. It is as follows.</p>
  
  <pre><code>function getTicksFromDatePicker(value) {
      var dateparts = value.split("-");
      //date format(Fullyear,month,date) 
      var startDate = new Date(dateparts[0], (dateparts[1] - 1).toString(), 
                (dateparts[2]).toString()); 
      var ret = ((startDate.getTime() * 10000) + 621355968000000000);
      if (isNaN(ret)) {
          ret = 1;
      }
      return ret;
  }
  </code></pre>
  
  <p>This code works perfectly if I use a normal html &lt; input type="date" > and pass its value to my function.</p>
  
  <p>I need to write a function which takes the value from an input of type="datetime" and convert it into c# ticks. I am having trouble doing so. I googled around but I did not find anything on how to. I would greatly appreciate any help you guys can provide me with.</p>