PDA

View Full Version : Interbase data type: DATE & ASP


chanthirar
10-09-02, 18:17
I'm new with InterBase database. I have InterBase 6.5 and EasySoft ODBC driver installed. I'm try to write ASP to get data from InterBase 5.x.

When I used this command in ASP, IBAdmin, IBAccess, IBView and InteractiveSQL, it wouldn't show data but I know for fact that that data is in the database:

select lastmodified
from visit
where lastmodified = '4/10/2002'

Lastmodified define as timestamp. I read in the book, it sound like correct but I do not know why the data not show up.

Please help,

CM

pickledAvenger
10-10-02, 13:32
I'm not familiar with InterBase, but the first thing I would try is running your query outside of ASP (straight through the DB) and see if it is working there. If it is not then we will need to modify the query, if it is then we need to look at the ASP.

Let us know how things go

Dan

chanthirar
10-10-02, 14:52
Actually, I did all that before I post the message. I even run query directly from InteractiveSQL on IBConsole (I assume it's like MS Query Analyst). But it still won't show. That field is TIMESTAMP. I'm not sure if it's need specify format to do it. But thank you anyway.

pickledAvenger
10-11-02, 08:55
Try changing your WHERE statement to

where lastModified >= '4/10/2002' and lastModified < '5/10/2002'

I'm treating the first digit as the day although you may want to increase the second one instead depending on your date format (e.g. 4/11/2002 for the second date).

Hope this helps

Dan

chanthirar
10-11-02, 12:44
Thank you. I'll try that.

Originally posted by pickledAvenger
Try changing your WHERE statement to

where lastModified >= '4/10/2002' and lastModified < '5/10/2002'

I'm treating the first digit as the day although you may want to increase the second one instead depending on your date format (e.g. 4/11/2002 for the second date).

Hope this helps

Dan