-
Date Difference
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!
-
Try to do it inside MySQL:
SELECT DATEDIFF(<name of date column>, NOW()) AS difference_in_days;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|