473,748 Members | 8,760 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Date format problem in MS-ACCESS

2 New Member
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 fields.
While executing the query I am getting [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
I found where the problem is but i don't know how to solve.
Problem is in date format.

where TT.ARRIVED between '2007-07-01 00:00:00' and '2007-07-30 00:00:00'
In the above part of the query ARRIVED is a DATE/TIME type field in MS-ACCESS and its format is General Date.
Please tell me how to give this format from java.

Thanks in advance.
Jun 25 '07 #1
1 3129
r035198x
13,262 MVP
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 fields.
While executing the query I am getting [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
I found where the problem is but i don't know how to solve.
Problem is in date format.

where TT.ARRIVED between '2007-07-01 00:00:00' and '2007-07-30 00:00:00'
In the above part of the query ARRIVED is a DATE/TIME type field in MS-ACCESS and its format is General Date.
Please tell me how to give this format from java.

Thanks in advance.
If you are prividing the Date from a Java program use java.sql.Date.
Jun 25 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

15
43012
by: Simon Brooke | last post by:
I'm investigating a bug a customer has reported in our database abstraction layer, and it's making me very unhappy. Brief summary: I have a database abstraction layer which is intended to mediate between webapps and arbitrary database backends using JDBC. I am very unwilling indeed to write special-case code for particular databases. Our code has worked satisfactorily with many databases, including many instances MS SQLServer 2000...
4
43536
by: Matteo | last post by:
Hy everybody. I'm not a html writer, but a sysadmin who's trying to help a user able to compile an online form with IE but not with Mozilla (Moz1.6, Ns7.1, Firefox 0.8+) due to a javascript date check. Let's go straight to the point: <script language="JavaScript"> alert("Date: "+Date.parse("2000-01-01"))
1
5511
by: Keith Chadwick | last post by:
Been trying to use the ms:format-date() in one of my transformations. I have all of the necessary declarations in my xml as in <?xml version="1.0" ?> <data xml:space="default" xmlns:dt="urn:schemas-microsoft-com:datatypes"> myxml... </data>
5
1407
by: Hai Nguyen | last post by:
I have a textbox which requires to fill out date in the format mm/dd/yyyy I want to know how i custom my validiator to check if input is in right format Thanks
3
1132
by: Herryandi | last post by:
Hi all, Im having date format in my ms sql server 2000 database. I always get a problem in inserting or updating data because of my date format. Im taking the value of date from textbox. This is how the code: dim d as date d = txtDate1.Text
7
12642
by: Fred Flintstone | last post by:
I'm writing a VB.Net windows forms application. This line of code: Personal.EffectiveDate = GridRow2.Cells("New Value").Value.ToString.Trim Fails with this error: Cast from string "8/23/2005" to type 'Date' is not valid. The date being returned is in US English and my system is set for
26
2724
by: jshanman | last post by:
I am writing a timeline that uses Google Maps. I have a function that converts a date time to latitude coords. This function is used to draw the markers on the timeline. I need a reverse function to convert a latitude coord back to an accurate date time. Then I could detect the day/hour in the viewport when the timeline is zoomed in or out, or if it is moved. I cannot use the javascript date functions because this timeline will...
14
82202
by: prasath03 | last post by:
Dear All, I have one doubt for how to insert the java.sql.Date into ms-sql server. I tried the below code but it couldn't be inserted. I did wrong in my code that is ps.setDate(1,full_date_time) to ps.setString(1,full_date_time); How can i covert the String(full_date_time) to java.sql.Date() and insert the MM/DD/YYYY format in ms-sql database? I set datetime as datatype in my products table. <% SimpleDateFormat sdf=new...
27
6887
by: RobG | last post by:
I was investigating a function to determine whether daylight saving was being observed on a particular date (given the platform's regional settings) and came across a suggestion at merlyn.com to test the time zone offset on a variety of dates to see if it changes. Based on that, I developed the following checkDST() function which, as far as I can tell, should be sufficient. It checks either the date passed to it or the current date with...
8
2952
by: yashiro | last post by:
Hello i Have a database in SQLserver. I am using php to connect to it and to retrieve data from that database. I have a table with a column (DATATIME) where i do : $result = mssql_query("SELECT date FROM table1") or die(mssql_error());
0
8831
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9548
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9249
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4876
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.