public static void writeUTF8(OutputStream out, DateWritableV2 d)
      throws IOException {
    ByteBuffer b = Text.encode(d.toString());
    out.write(b.array(), 0, b.limit());
  }
Writes a Date in SQL date format to the output stream.
@param out
         The output stream
@param d
         The Date to write
@throws IOException
serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyDate.java