# Database Discussions > MySQL >  Date Difference

## karubum

I have made a table in mysql, and one of the member of this table is "in_date" which I have assigned it as "DATE". 

Now, I want to calculate remaining days of "today" and "in_date".

<?php

$remaining_date = $today - $in_date;

echo $remaining_date;

?>

I want to display "days" but it does not work!

----------


## intellicon

Try to do it inside MySQL:

SELECT DATEDIFF(<name of date column>, NOW()) AS difference_in_days;

----------

