Solved

Query

Posted on 2000-02-18
3
170 Views
Last Modified: 2010-04-04
Hi

please tel me whats wrong with this
Query1.Sql.Add ('select * from Invoice');
Query1.Sql.Add ('Where Date >= "1/1/2000" and Date <= "31/1/2000"');
When i run the program give me type mismatch expression

0
Comment
Question by:sivatagiherceg
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 5 total points
ID: 2534396
hi,

A / is interpreted as M/D/Y. A . is interpreted as D.M.Y.

Thus :

11/1/99 is November 1, 1999.

11.1.99 is January 11, 1999.

here is an example with the orders.db from dbdemo

select *
from orders
where (SaleDate >= '04/12/1988') AND (SaleDate <= '08/12/1988')


Regards, Zif.
 
0
 
LVL 5

Expert Comment

by:TheNeil
ID: 2534402
Make sure that your dates are formatted correctly. I find that it expects them to be in the format

YYYY-MM-DD HH:MM:SS

You could also try getting rid of the "s

Have you tried your queries out in database desktop or somtehing similar?

The Neil

0
 
LVL 8

Expert Comment

by:ZifNab
ID: 2534432
argh, sivatagiherceg,

sorry I didn't noticed the comment on your previous question. I don't get notified when a comment is given. Only when an answer is rejected or graded. Sorry!

Well, I think it should work now. Not?

Zif.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question