at first i'm using
datediff('d', a.due_date, current_date);
but it takes too long to get the result
but how can i subtract the current_date - a.due_date
and still get the same result like when i use datediff?
thank you
for getting date difference you can use it.......
select to_days(now())- to_days(date);
for example-
SELECT TO_DAYS(NOW())- TO_DAYS('2010-12-01');
TO_DAYS(DATE) command return a number which is total no. of
days between '0000-01-01' and the given date.
Is This Answer Correct ? | 0 Yes | 0 No |
What is the datatype of image?
How can an index be declared in mysql?
how you will Create a database on the mysql server with unix shell.
How to insert html code into mysql database using php?
Can I use mysql for free?
Why we use mongodb instead of mysql?
What is the difference between mysql_fetch_array and mysql_fetch_object?
What is the purpose of using ifnull() function?
What is database clustering in mysql?
What does mysql workbench do?
What is the latest version of mysql?
How to Creating a new user. Login as root. Switch to the MySQL db. Make the user. Update privs.