Jump to content

Display date/time field from MS Access


bCourtney07

Recommended Posts

Okay i'm trying to display the date from a record within ms access.  The date is supposed to read 1/12/2008 but instead it displays as 1200117600.

 

Here is my code

 

<?php
require("displayconfig.php");


$sql = "SELECT * FROM Activity_Log WHERE Employee_ID = '{$_POST["Employee_ID"]}'";
$rs = $conn->Execute($sql);
?>
<table border="1" cellpadding="5" cellspacing="5" align="center" width="50%">
<tr>
<th>Employee ID</th>
<th>Date</th>
<th>Miles</th>
<th>Activity</th>
<th>Minutes</th>
</tr>
<?php while (!$rs->EOF) { ?>
<tr>
	<td><?php echo $rs->Fields['Employee_ID']->Value ?></td>
	<td><?php echo $rs->Fields['Date']->Value ?></td>
	<td><?php echo $rs->Fields['Miles']->Value ?></td>
	<td><?php echo $rs->Fields['Activity']->Value ?></td>
	<td><?php echo $rs->Fields['Minutes']->Value ?><br></td>
</tr>
<?php $rs->MoveNext() ?>
<?php } ?>
</table>
<?php
$rs->Close();
$conn->Close();
$rs = null;
$conn = null;
?>

 

Does anybody know how i can fix this without having to change the data type in my ms access database?

 

Thanks in advance! :)

Link to comment
https://forums.phpfreaks.com/topic/85966-display-datetime-field-from-ms-access/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.