|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29171 Do not fetch TimeStamp variable
Submitted: 2004-07-15 01:35 UTC Modified: 2004-07-29 05:36 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: alain at samoun dot com Assigned:
Status: Not a bug Package: COM related
PHP Version: 5.0.0 OS: windows XP Pro
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
31 - 4 = ?
Subscribe to this entry?

 [2004-07-15 01:35 UTC] alain at samoun dot com
Problem getting TimeStamp data from Access database
XP Pro - PHP 5.0.0 ADODB 2.7 Seems to be a casting problem:
Instead of getting for example: 7/7/2004 4:58:10 PM (A Date/Time data type in Access) we get no data in PHP 5.
PHP4.3 gets it correctly.

Reproduce code:
$table= "FORM_ID_274274176"; 
#Initialize the Database
include(""); #Catch exeptions in PHP5
	$db = &ADONewConnection("ado_access");

	#Access database
	$access = 'C:\Program files\forms3\forms32k.mdb';

		. 'DATA SOURCE=' . $access . ';';
		//. 'USER ID=;PASSWORD=;';
		@$db->pConnect($myDSN, "", "", "");	 
	#Query Access	
	$query = "SELECT TimeStamp,A,B FROM $table where A ='TOYOTA'";
	$result = $db->Execute($query) or die("Error in query: $query. " . $db->ErrorMsg());
	echo rs2html($result);


Expected result:
TimeStamp	        A	B
7/7/2004 4:58:10 PM  	TOYOTA 	NISSAN
7/7/2004 4:59:00 PM  	TOYOTA 	 

Actual result:
TimeStamp	        A	B
Thu 01, Jan 1970  	TOYOTA 	NISSAN
Thu 01, Jan 1970  	TOYOTA 	 

Note the actual value for the TimeStamp variable is 0, I suppose the "Thu 01, Jan 1970" is a default?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-26 17:22 UTC] msisolak at yahoo dot com
This appears to be an issue with how ADOdb interacts with the new Variant object in PHP5 (not using variant_date_to_timestamp when pulling in a date value).  See follow-up in ADOdb forum:
 [2004-07-29 05:36 UTC]
This is intended behaviour.
It's better for you this way :-)
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Apr 01 07:03:36 2023 UTC