Ok guys, I have this really big problem. I am developing on the windows os using ms access of the database of choice. I am having a problem displaying a value of a date field. It does contain records. Here is the code:
$db = 'myDatabase.mdb';
$conn = new COM('ADODB.Connection');
$conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$db");
$sql = "SELECT * FROM tblEmployeeInfo WHERE EmployeeId = '$selectedId'";
$rs = $conn->Execute($sql);
// LOGICAL ERROR (Displays a weird date rather than 06/20/2003)
echo $rs->Fields["EmpDate"]->Value;
exit;
When I try to display the value of the date field, it returns with some odd number rather than the actual date format. It returns with the value 1611129600 rather than 06/20/2003 for example. I looked up the value on the internet and it said something about basetime which I am not familiar with. How do I display the date in the actual date format mm/dd/yyyy rather than that weird number. In my access database I have explicitly specified a short-date format for the EmpDate field. Someone please help me out. Thank you
Armond
bb_sarkar@yahoo.com
================🙂 🙂