How to calculate the number of days between two dates available in sqlite or mysql database table? I have already searched it on google but couldn't found any solution. What is proper query for getting number of days between two dates?
            Asked
            
        
        
            Active
            
        
            Viewed 326 times
        
    -3
            
            
        - 
                    Use `datediff()` function on MySQL. Ref: https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_datediff – Madhur Bhaiya Oct 23 '18 at 12:45
 - 
                    I would be really curious as to how you searched for an answer to this question, so that you did not find any solutions... – Shadow Oct 23 '18 at 13:25
 
1 Answers
0
            
            
        the query should look like this, MySQL:
SELECT datediff(current_date(), '2018-10-01') AS numberOfDays FROM dual;
        Aleksandar Rakic
        
- 324
 - 1
 - 6