Add datetime encoding/decoding support