Add convert_value method for date and time