title: Date to timestamp with nanos
body: <p>I want to convert date to timestamp for setting the variable. 
  I have below code but seems invalid.</p>
  
  <pre><code>Date org_last_upd_ts=xxxxxxx;
  
  SimpleDateFormat sdf=new SimpleDateFormat("SSSSSS");
  Timestamp org_lastupdts=new Timestamp(org_last_upd_ts.getTime());
  org_lastupdts.setNanos(Integer.valueOf(sdf.parse(o rg_last_upd_ts.toLocaleString()).toString()));
  </code></pre>
  
  <p>Any idea how to do so?</p>