mysql把字符串转换成日期类型

直接上例子:

MySql:SELECT P.PROCEDURE_JOB_ID,P.PROCEDURE_NUMBER,P.PROCEDURE_NAME,P.PART_ORDER_ID,P.QUANTITY FROM PROCEDURE_JOB_ORDER P WHERE 1=1  AND P.START_DATE >= STR_TO_DATE('2018-04-29','%Y-%c-%d') AND P.START_DATE <= STR_TO_DATE('2018-05-14','%Y-%c-%d')                        *注意%Y的大小写*


oracle:SELECT P.PROCEDURE_JOB_ID,P.PROCEDURE_NUMBER,P.PROCEDURE_NAME,P.PART_ORDER_ID,P.QUANTITY FROM PROCEDURE_JOB_ORDER P WHERE 1=1  AND P.START_DATE >= TO_DATE('2018-04-29','YYYY-MM-DD') AND P.START_DATE <= TO_DATE('2018-05-14','YYYY-MM-DD')

你可能感兴趣的:(mysql把字符串转换成日期类型)