开发者

Compare datatime field with current datetime in MySQL

I have something like that:

to_days(now()) < to_days(birth)

It work but instead of comp开发者_StackOverflowaring days I was to compare the time too. Is there a similar function?


Why don't you just use:

birth > NOW()


Are you looking for DAYOFYEAR() function ? http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_dayofyear

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜