You should use java.text.SimpleDateFormat to convert String value to Date. E.g.

1 private static final SimpleDateFormat sdf = new SimpleDateFormat(”yyyy-MM-dd”);
2 String birthDate = “ 1981 - 12 - 30 ?;
3 Date birth = sdf.format(birthDate);

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
  • 2022-01-07
  • 2022-03-09
  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-09
  • 2021-07-29
  • 2022-01-05
  • 2022-12-23
  • 2021-08-16
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案