1.

Why Isn't String -> Date Conversion Provided By Default?

Answer»

SIMPLY because DIFFERENT regions of the world use different date LAYOUTS. There isn't any date format that is a reasonable built-in default.

  • USA: mm-dd-yyyy, mm/dd/yyyy
  • Europe/Pacific: dd-mm-yyyy
  • Other popular formats: yyyy-mm-dd, yyyymmdd

If you want BeanUtils to do implicit String->Date conversions for you, then you just need to register a SUITABLE converter for the date formats you expect to encounter in your input.

Simply because different regions of the world use different date layouts. There isn't any date format that is a reasonable built-in default.

If you want BeanUtils to do implicit String->Date conversions for you, then you just need to register a suitable converter for the date formats you expect to encounter in your input.



Discussion

No Comment Found