Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要MySQL 5.0.88根据以下标准选择记录:
MySQL 5.0.88
timestamp_last_update must have been set after the beginning of the current month
我DateFormat目前正在查看,但无法使其正常工作。
DateFormat
有人可以提供一些关于这是否可以用 MySQL 完成的信息吗?
谢谢!
你应该使用类似的东西
WHERE timestamp_last_update > CAST(DATE_FORMAT(NOW() ,'%Y-%m-01') as DATE)
或者
WHERE timestamp_last_update >= CAST(DATE_FORMAT(NOW() ,'%Y-%m-02') as DATE)
取决于“当月开始之后”的含义(即第一天是否必须计算在内)。