bCourtney07 Posted January 14, 2008 Share Posted January 14, 2008 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! Quote Link to comment https://forums.phpfreaks.com/topic/85966-display-datetime-field-from-ms-access/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.