ISDATE() equivalent for MySQL

后端 未结 5 1392
迷失自我
迷失自我 2021-01-12 01:45

I have a line of code for SQL server which takes a date listed as \"YYYYMMDD\" where the DD is 00 and converts the 00 to 01 so that it works with datetime. I would like to

5条回答
  •  难免孤独
    2021-01-12 02:34

    Well, while I appreciate all statements, I always like it the easy way.

    All date stamps either have the "-" or "/" characters in them, so why not check all date columns that have such characters, using the LIKE argument.

    SELECT * FROM TABLE WHERE DATE_COLUMN LIKE '%/%';
    SELECT * FROM TABLE WHERE DATE_COLUMN LIKE '%-%';
    

提交回复
热议问题