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
精彩评论