标签: mysql sql timestamp
如何获取2014年的行并将其与时间戳值进行比较?
代码在这里:
SELECT FROM_UNIXTIME(tidpunkt, '%Y') AS tidpunkt FROM ringupp WHERE tidpunkt == "CURRENT YEAR IN TIMESTAMP 2014";
答案 0 :(得分:2)
您只需使用YEAR:
YEAR
WHERE YEAR(FROM_UNIXTIME(tidpunkt)) = 2014