code: public String marshal( Date value )
      {
          String val = "";
      	if (value != null) {
          	Calendar cal = new GregorianCalendar();
          	cal.setTime( value );
          	return DatatypeConverter.printDateTime( cal );
          }
  		
  		System.out.println("Date value: " + value);
          return val;
      }
docs: Marshal a Date to a String for use by JAXB.
  
  @param value Date object to marshal.
  @return String form of date.