title: How to get just year (month, date...) from input type="datetime-local"?
body: <p>I am making the code in JavaScript, that calculates Julian day at the inputted date. It is using a Jean Meeus algorithm (<a href="http://www.agopax.it/Libri_astronomia/pdf/Astronomical%20Algorithms.pdf" rel="nofollow noreferrer">http://www.agopax.it/Libri_astronomia/pdf/Astronomical%20Algorithms.pdf</a> - page 61). I have made HTML tag "input type="datetime-local"" to access user inputting date and time. I want to get just year, month, date, hour and minute. Data must be stored in the variables apart. But I don't know how to do it.</p>
  
  <p>I have already seen W3 pages, StackOverflow page, etc. I haven't found any answer. (I didn't understand even page <a href="https://stackoverflow.com/questions/19597361/parse-date-month-and-year-from-javascript-date-form">Parse Date, Month, and Year from Javascript &quot;Date&quot; form</a>.)</p>
  
  <pre><code>&lt;head&gt;
    &lt;script&gt;
      var x = document.getElementById("JulianDayData").value;
      document.getElementById("JulianDayDisplay").innerHTML = x;
    &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;input type="datetime-local" name="JulianDayData" id="JulianDayData"&gt;
    &lt;input type="submit" value="Send" onclick="Function()"&gt;
    &lt;p id="JulianDataDisplay"&gt;&lt;/p&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Any answers?</p>