public static Timestamp convertDateValueToTimestamp(long dateValue,long timeNanos){
  long millis=timeNanos / 1000000;
  timeNanos-=millis * 1000000;
  long s=millis / 1000;
  millis-=s * 1000;
  long m=s / 60;
  s-=m * 60;
  long h=m / 60;
  m-=h * 60;
  long ms=getMillis(null,yearFromDateValue(dateValue),monthFromDateValue(dateValue),dayFromDateValue(dateValue),(int)h,(int)m,(int)s,0);
  Timestamp ts=new Timestamp(ms);
  ts.setNanos((int)(timeNanos + millis * 1000000));
  return ts;
}

public static Timestamp convertDateValueToTimestamp ( long dateValue , long timeNanos ) { long millis = timeNanos / 1000000 ; timeNanos -= millis * 1000000 ; long s = millis / 1000 ; millis -= s * 1000 ; long m = s / 60 ; s -= m * 60 ; long h = m / 60 ; m -= h * 60 ; long ms = getMillis ( null , yearFromDateValue ( dateValue ) , monthFromDateValue ( dateValue ) , dayFromDateValue ( dateValue ) , ( int ) h , ( int ) m , ( int ) s , 0 ) ; Timestamp ts = new Timestamp ( ms ) ; ts . setNanos ( ( int ) ( timeNanos + millis * 1000000 ) ) ; return ts ; }
convert an encoded date value / time value to a timestamp , using the default timezone .
