title: Convert current datetime to long in Java
body: <p>I want to convert the current datetime to a long value in Java.</p>
  
  <p>I know it has to be something with the DateTime</p>
  
  <pre><code>DateTime datetime = new DateTime();
  </code></pre>
  
  <p>But I couldn't find a way to convert the dateTime to long.</p>