Encode Date instead of String