title: android convert Date to TimeStamp
body: <p>Following code is working fine in my java application. But when I am making the same application for Android using java it's showing error "<em>The constructor Timestamp(long) is undefined</em>" in the following bold line "<strong>Timestamp rtnTS = new Timestamp(theDate.getTime());</strong>"</p>
  
  <pre><code>public static Timestamp createTimeStamp(String strTime, String strFormat) throws Exception
  {
      strTime = strTime.trim();
  
      SimpleDateFormat formatter = new SimpleDateFormat(strFormat);
      java.util.Date theDate = new java.util.Date();
      theDate = (java.util.Date) formatter.parse(strTime);
      **Timestamp rtnTS = new Timestamp(theDate.getTime());**
      return rtnTS;
  }
  </code></pre>
  
  <p>Anyone please help to sortout this issue.</p>