title: Java8 : LocalDateTime or TimeStamp
body: <p>Which is more preferable at when or where ?</p>
  
  <p>I don't know exactly what are actual differences between them.</p>
  
  <p>From documentation of <a href="https://docs.oracle.com/javase/8/docs/api/java/time/LocalDateTime.html" rel="noreferrer">LocalDateTime</a></p>
  
  <blockquote>
    <p>...Time is represented to nanosecond precision. For example, the value "2nd October 2007 at 13:45.30.123456789" can
    be stored in a LocalDateTime.</p>
  </blockquote>
  
  <p>I assumed LocalDateTime can also accept until nanoseconds.So I think , I can replace my codes with <a href="https://docs.oracle.com/javase/8/docs/api/java/time/LocalDateTime.html" rel="noreferrer">LocalDateTime</a> these are declared as <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/Timestamp.html" rel="noreferrer">TimeStamp</a>. Please correct me if I am wrong.</p>
  
  <p>Scenario : we had planned to upgrade our project with Java-8. Modified old codes styles with new features of JAVA-8 (eg:Lambda,Streams etc;). But we got trouble while deciding for Dates and Times. Most of codes with <code>java.util.Date</code> were changed to <code>java.time.LocalDate</code> or <code>java.time.LocalDateTime</code>. For the cases of <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/Timestamp.html" rel="noreferrer">TimeStamp</a> , I have no idea about the question </p>
  
  <p>Should we replace them with <a href="https://docs.oracle.com/javase/8/docs/api/java/time/LocalDateTime.html" rel="noreferrer">LocalDateTime</a> ?</p>