【发布时间】:2023-03-13 05:31:02
【问题描述】:
我有一个不可避免的情况,日期以英国日期格式存储,例如:
31/12/2001 00:00:00
我需要它按降序排列,我试过了,但它出错了
select *, DATE_FORMAT(completiondate,'\%e/%c/%Y\') as cdate
from projects
where countries = 1
order by cdate desc
错误:
查看与您的 MySQL 服务器版本相对应的手册 在 '' order by cdate desc' 附近使用的正确语法
我使用的是 MySQL 4.1.9
【问题讨论】:
-
没有
order by子句是否有效?
标签: mysql sql sorting datetime