code: public void addDateTimeHelper(int ds, Date date) throws SerializationException, InvalidDataSetException {
  		if (date == null) {
  			return;
  		}
  
  		DataSetInfo dsi = dsiFactory.create(ds);
  
  		SimpleDateFormat df = new SimpleDateFormat(dsi.getSerializer().toString());
  		String value = df.format(date);
  		byte[] data = dsi.getSerializer().serialize(value, activeSerializationContext);
  		DataSet dataSet = new DefaultDataSet(dsi, data);
  		add(dataSet);
  	}
docs: Adds a data set with date-time value to IIM file.
  
  @param ds
  data set id (see constants in IIM class)
  @param date
  date to set. Null values are silently ignored.
  @throws SerializationException
  if value can't be serialized by data set's serializer
  @throws InvalidDataSetException
  if data set isn't defined