Comparing datatime field with current time and time in MySQL

I have something like this:

to_days(now()) < to_days(birth) 

This works, but instead of comparing the days, I also had to compare the time. Is there a similar feature?

+4
source share
2 answers

Why don't you just use:

 birth > NOW() 
+7
source
0
source

Source: https://habr.com/ru/post/1306830/


All Articles