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 |
How do I stop a query in mysql workbench?
What do you mean by % and _ in the LIKE statement?
How to get help information from the server?
write a c++ program to add a user to mysql.the user should be permitted to only "insert" into the given database
How can you find out the version of the installed mysql?
Is mysql relational?
What is full form of xampp?
What is blob and text in mysql?
Transactions are used to treat sets of SQL statements atomically. State Whether True or False?
What is mysql shell?
What is truncate command?
What is a blob datatype?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)