473,396 Members | 2,030 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

MS Access Date/Time Data type mismatch

I am receiving the following error:

MS Access Date/Time DBD::ODBC::st execute failed: [Microsoft][ODBC
Data type mismatch in criteria expression

when executing the following code.

$sqlstatement="SELECT [Import Date], [Transaction Type], [Item
Number]" .
"FROM [Open Transactions] WHERE [Import Date] > '2004/02/01
11:16:16'";

$sth = $dbh->prepare($sqlstatement);
$sth->execute ||
die "Could not execute SQL statement ... maybe invalid?";

The [Import Date] is defined as an MS Date/Time type and contains the
following Db entry format: 4/12/2004 9:22:37 AM

I've tried numerous literal values within the SELECT/WHERE but I am
having absolutely no luck with other formats as well as locating a
solution via the web.

Any help would be greatly appreciated!

Thanks!
Nov 12 '05 #1
1 14664
Access delimits dates with #, not '.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)

"Jacquo Johnson" <ge******@hotmail.com> wrote in message
news:22**************************@posting.google.c om...
I am receiving the following error:

MS Access Date/Time DBD::ODBC::st execute failed: [Microsoft][ODBC
Data type mismatch in criteria expression

when executing the following code.

$sqlstatement="SELECT [Import Date], [Transaction Type], [Item
Number]" .
"FROM [Open Transactions] WHERE [Import Date] > '2004/02/01
11:16:16'";

$sth = $dbh->prepare($sqlstatement);
$sth->execute ||
die "Could not execute SQL statement ... maybe invalid?";

The [Import Date] is defined as an MS Date/Time type and contains the
following Db entry format: 4/12/2004 9:22:37 AM

I've tried numerous literal values within the SELECT/WHERE but I am
having absolutely no luck with other formats as well as locating a
solution via the web.

Any help would be greatly appreciated!

Thanks!

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: D | last post by:
Guys, i had try to update the "Date" value in my access to empty string. The data type for the column value is Date/Time. I use the following simple code: rsForum ("Date") = "" It give me...
1
by: Ken | last post by:
I wrote a function to use in queries that takes a date and adds or subtracts a certain length time and then returns the new value. There are times when my function needs to return Null values. ...
1
by: Jacquo Johnson | last post by:
I am receiving the following error: MS Access Date/Time DBD::ODBC::st execute failed: , , " . "FROM WHERE > '2004/02/01 11:16:16'"; $sth = $dbh->prepare($sqlstatement); $sth->execute ||...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
2
by: Giulio | last post by:
I make an import of a huge file txt table with headers at each page and date format as "20.12.2004" in order to use the data I first qo a query that exclude all line representing the headers...
1
by: nagi28 | last post by:
Hi All, I am executing a select query which involve join between three tables through jdbc. I am using MS-ACCESS as database. This query needs to get the data based on some conditions on date...
2
by: tmoon3 | last post by:
Hello, This must be a simple mistake, but for some reason I cannot seem to get around it. I am simply trying to create a report of all employees that have a date filled in in a training column...
3
by: shivasusan | last post by:
Hi! I am using for my project ASP and Microsoft Access. start date and end date -- In database (Microsoft Access) i set the datatype is Date/Time. It's display error. The error is below:...
2
by: shivasusan | last post by:
Hi! when i pass the data to my database MS-Access. i got error. Error Type: Microsoft JET Database Engine (0x80040E07) Data type mismatch in criteria expression....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.