Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting date from a pervasive DB

Status
Not open for further replies.
Jun 17, 2004
73
US
I posted this in the pervasive forum but wanted to post it here in case someone had the same issue in this forum and was able to help me.

Im trying to pull data from a pervaive table via a DTS in SQL Server. The query below returns data in the pervasive control center but when I try to run the DTS it does not return anything. I think it is because it reads the date as a string not as a date. (I had that problem in a page I was working on) I was wondering if there is a Cast or Convert function I can use. I tried using cast like you see below but it did not work.

SELECT Com_Pat_Id, Com_Line, Com_Usr_Id_Added, Com_Date_Added
FROM table1
WHERE Com_Date_Added >CAST( '2005-07-24' AS datetime) AND Com_Pra_id = 'ADS'
 
Show the output date format

Dr. Sql
goEdeveloper@yahoo.com
Good Luck.
 
In pervasive the format is 2005-07-24 in sql the output is going to be the standard 7/24/2005
 
What error are you getting?

What date format is Com_Date_Added?

-SQLBill

Posting advice: FAQ481-4875
 
I should also have asked....what datatype is Com_Date_Added?

-SQLBill

Posting advice: FAQ481-4875
 
Thanks for you help but i got it. Stupid mistake not checking where the ODBC was pointing to on my machine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top