I am trying to get the earliest and latest dates from a table field.
These are the dates as stored.
01/30/2015 02/31/2014 10/26/2014 01/31/2015
Using these queries:
$sql = "SELECT MIN(closing_date) AS first_date FROM ft_form_8 WHERE closing_date >''
AND status = 'closed' AND nar_id = $nar_id ";
$sql = "SELECT MAX(closing_date) AS last_date FROM ft_form_8 WHERE closing_date >''
AND status = 'closed' AND nar_id = $nar_id ";
The first_date value when retrieved is: 01/30/2015 The last_date value when retrieved is: 10/26/2014
Any suggestions?