473,385 Members | 1,958 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,385 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 14660
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.