mysql内置函数,在mysql里面利用str_to_date()把字符串转换为日期格式

示例:分隔符一致,年月日要用%号

 

select str_to_date('2008-4-2 15:3:28','%Y-%m-%d %H:%i:%s');

select str_to_date('2008-08-09 08:9:30', '%Y-%m-%d %h:%i:%s');

相关文章:

  • 2022-12-23
  • 2021-12-12
  • 2022-02-08
  • 2021-11-23
  • 2021-07-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
相关资源
相似解决方案