I have a problem to return json with date and time the code is as follows:
<?php
$sql = "SELECT CRED_NUMERO, MOV_DATAHORA FROM APOIO.LOG_CREDENCIAL_APOIO A WHERE A.CRED_NUMERO = 10734568 AND TRUNC(MOV_DATAHORA) = TRUNC(SYSDATE)";
$conn = oci_connect('xxx', 'xxx', '127.0.0.1/DBUAM');
$dados = oci_parse($conn, $sql);
oci_execute($dados, OCI_DEFAULT);
$linhas = array();
while($l = oci_fetch_assoc($dados)){
$linhas[] = $l;
}
$json = (json_encode($linhas));
echo $json;
?>
The result of json is this:
p>
If you notice the resulting JSON shows only the DATA being that what matters most to me is time. How to format?