Sir I have these codes
<?php
$stockdate="";
$queryx = "SELECT max(data.date)as date
from (
select max(date)as date from crprp
union all
select max(date)as date from pouring
union all
select max(date)as date from product
) as data";
$resultx = sqlsrv_query($con,$queryx)or die ("Error". sqlsrv_errors($con)) ;
while ($rowx = sqlsrv_fetch_array ($resultx)){
$stockdate=($rowx['date']);
}
print_r($stockdate);
echo date('l F d, Y', strtotime($stockdate));
?>
The codes displays this result
I tested the codes at some place like this
The result is ok here but what is worng with my above codes?
Please