code: public static String toSQLString(Long position) {
          java.util.Date date = AbsoluteTimeGranularityUtil.asDate(position);
          return new Timestamp(date.getTime()).toString();
      }
docs: Convenience method to translate a timestamp into the format expected by
  SQL.
  
  @param position a date/time in milliseconds since the epoch.
  @return a {@link String} in JDBC timestamp escape format.