Parse Date from MM/DD/YYYY to a format MYSQL can work with

前端 未结 3 1846
悲哀的现实
悲哀的现实 2021-01-28 13:55

Currently working with a MLS data dump in which all their dates are formatted in MM/DD/YYYY , Trying to get the min/max age

        MIN( DateDiff( NOW(), idx_com         


        
3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-28 14:17

    http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_str-to-date contains the answer you seek.

    However - please consider using real DATETIME columns instead of strings in your database, if at all possible.

提交回复
热议问题