Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.