We are trying to get the following script to display the full date and time. The field we are calling does have both date and time in. Unfortunatly its only returning the date.
So I tried putting the sql "to_date('Adate','dd/mm/yyyy hh24:mi')" to disply the full field. No Luck
Any help is much appresiated. Thanks.[php]<HTML>
<HEAD><TITLE> Property Results </TITLE>
</HEAD>
<BODY>
<?php
$sql="Select * from Appointment where Appointment_id = ".$_GET["Appointment_id"];
putenv("TNS_ADMIN=/u1/oracle/Products/shu10g/network/admin");
$conn = OCILogon("Username","Password","shu10g");
$stmt = ociparse($conn,$sql);
ociexecute($stmt);
ocifetchinto($stmt,$row);
ocifreestatement($stmt);
ocilogoff($conn);
?>
<form name="form1"method="post" action="appointmenthandler.php">
<input name="Appointment_id" type=hiddenid="Appointment_id" value='<?php print $row[0];?>'>
<table width="75%" border="1">
<tr>
<td><strong>Appointment ID</strong></td>
<td><?php print $row[0];?></td>
</tr>
<tr>
<td><strong><strong>Staff ID
</stong>
</strong></td>
<td><input name="Staff_id" type="text" id="Staff_id" value='<?php print $row[1];?>'></td>
</tr>
<tr>
<td><strong><strong>Tenant ID
</string>
</strong></td>
<td><input name="Tenant_id" type="text" id="Tenant_id" value='<?php print $row[2];?>'></td>
</tr>
<tr>
<td><strong>Property ID</strong></td>
<td><input name="Property_id" type="text" id="Property_id" value='<?php print $row[3];?>'></td>
</tr>
<tr>
<td><strong>Description</strong></td>
<td><input name="Description" type="text" id="Description" value='<?php print $row[4];?>'></td>
</tr>
<tr>
<td><strong>Appointment Date</strong></td>
<td><input name="Adate" type="text" id="Adate" value=
'<?php
$sql="Select to_date('Adate','dd/mm/yyyy hh24:mi') from Appointment where Appointment_id = ".$_GET["Appointment_id"];
putenv("TNS_ADMIN=/u1/oracle/Products/shu10g/network/admin");
$conn = OCILogon("Username","Password","shu10g");
$stmt = ociparse($conn,$sql);
ociexecute($stmt);
ocifetchinto($stmt,$row);
print $row[5];
ocifreestatement($stmt);
ocilogoff($conn);
?>'
</td>
</tr>
<tr>
<td><strong>Duration (Min)</strong></td>
<td><input name="Duration_Min" type="text" id="Duration_Min" value='<?php print $row[6];?>'></td>
</tr>
</table>
<p>
<input type="submit" name"Submit" value="Submit">
</p>
</form>
</BODY>
</HTML>[/php]