title: How to convert GMT datetime SQL data type to JAVA EST timestamp on JDK 1.7
body: <p>datetime datatype in GMT SQL server:
  Column name = PostedDateTime
  Value = 2019-09-30 17:46:04.600 </p>
  
  <p>I'm trying to use JAVA code to convert that datetime value to an EST timestamp
  So the output should be:
  2019-09-30 13:46:04</p>
  
  <p>Any ideas how to convert this, please include the package that needs to be imported?</p>
  
  <p>So far I have this:</p>
  
  <pre><code>SimpleDateFormat dr = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
  SimpleDateFormat dr1 = new SimpleDateFormat("MM-dd-yyyy HH:mm:ss");
  String dateString = obj.getStringProperty("S_DISCUSSION_POSTEDDATETIME");
  Date date = dr.parse(dateString);           
  strRetBuffer.append(obj.getStringProperty("S_DISCUSSION_AUTHOR") + ": " + dr1.format(date) + ": " + obj.getStringProperty("S_DISCUSSION_TOPICNAME")+": " +obj.getStringProperty("S_DISCUSSION_BODY") + "\n\r" );
  </code></pre>