Msyql 不规则、任意日期转换标准时间

    xiaoxiao2026-09-24  20

    select DATE_FORMAT(STR_TO_DATE(end_date, '%d/%m/%Y'), '%Y-%m-%d') from app_coupon_api 

    //------------------------------------------------------------------------------------------------------------------------------------------

    select count(*) from  ( select * from app_coupon_api where website = 'Fancyladies.com' and status = 'public' and UNIX_TIMESTAMP(STR_TO_DATE(left(end_date,10), '%m/%d/%Y')) > UNIX_TIMESTAMP(now()) union  select * from app_coupon_api where website = 'Fancyladies.com' and status = 'public' and UNIX_TIMESTAMP(STR_TO_DATE(left(end_date,10), '%m/%d/%Y')) = 0 union  select * from app_coupon_api where website = 'Fancyladies.com' and status = 'public' and end_date is null )t 

    转载请注明原文地址: https://ju.6miu.com/read-1312292.html
    最新回复(0)