-3
Good afternoon guys, I am not able to display and convert sql dates that were REGISTERED, I want to display in Brazilian format, someone can help me?
CODE
<?php
$sql="";
require('conexaobd.php');
if (isset($_GET["pesquisa"])) {
$nome = $_GET["pesquisa"];
$sql = "SELECT numero_de_processo, paciente, data_de_entrada, convenio, tipo_de_internacao, data_saida FROM internacoes WHERE paciente LIKE '%$nome%' ORDER BY paciente ASC";
}else
$sql = "SELECT numero_de_processo, paciente, data_de_entrada, convenio, tipo_de_internacao, data_saida FROM internacoes ORDER BY paciente ASC";
$resultado = mysqli_query($link, $sql);
$inc = 0;
while ($cont = mysqli_fetch_array($resultado)) {
echo "
<tr>
<td>".$cont['paciente']."</td>
<td>".$cont['data_de_entrada']."</td>
<td>".$cont['convenio']."</td>
<td>".$cont['tipo_de_internacao']."</td>
<td>".$cont['data_saida']."</td>
<td>
<a href='vizuinternacao.php?numero_de_processo=".$cont['numero_de_processo']."&paciente=".$cont['paciente']." target='new_blank'>
<span class='role orange'>
<i class='fa fa-eye'></i>
</span>
</a>
</td>
<td>
<a href='edit_internacao.php?numero_de_processo=".$cont['numero_de_processo']."&paciente=".$cont['paciente']." target='new_blank'>
<span class='role user'>
<i class='fa fa-edit'></i>
</span>
</a>
</td>
</tr>
";
}
?>
</tbody>
</table>
Does this Answer your Question? Format date and time with PHP
– Ghért B. König