I want to calculate the remaining duration using an SQL query or using PHP. I have a table that has fields
- date_submit
(example 2019-12-01 09:40:22 ) and
- duration
( example 30 days )
For example today is 2019-12-02 so the remaining duration is 29, how can I calculate this in SQL or PHP?