code: public static String getDateString(Date date) {
          SimpleDateFormat sdf = new SimpleDateFormat(sdformatMillisec);
          sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
          StringBuffer dateBuffer = new StringBuffer(sdf.format(date));
          // above string is in this format
          //    2005-05-04T09:34:18.444-0400
          // convert it to
          //    2005-05-04T09:34:18.444-04:00
          dateBuffer.insert(dateBuffer.length() - 2, ":");
          return dateBuffer.toString();
      }
docs: Returns a date String from the specified Date object. It is expected to be called before passing the date to SDO set method.
  
  For example:
  date = new Date();
  entity.set("registerDate", SDOHelper.getDateString(date));
  
  Input: 2005-05-04T09:34:18.444-0400
  Output: 2005-05-04T09:34:18.444-04:00
  
  @param date The Date object.
  @return A date String that converted from Date object.