dbTalk Databases Forums  

Paradox DB and TIME field

comp.databases.paradox comp.databases.paradox


Discuss Paradox DB and TIME field in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Thorak
 
Posts: n/a

Default Paradox DB and TIME field - 10-23-2006 , 02:33 PM






I cant seem to get my odbc_result to work with a Paradox database TIME
field. My result always comes back as a date of 1899-12-30.... this is
driving me nuts, thats not a time... thats a date! It also always
returns the exact same date even if the time is different. All the
other odbc_results return the proper information..... just not the TIME
field.

Does anyone know what is going on?!


Reply With Quote
  #2  
Old   
Bertil Isberg
 
Posts: n/a

Default Re: Paradox DB and TIME field - 10-23-2006 , 03:47 PM






From which database to you retrieve the records? Does that database have a
Time datatype?

Time and Dates are really only numbers presented as Time and Date, so time
and date are a display format. IMO, it should be impossible to get a Paradox
time field to display the result as a date. My guess is that the data is
returned as datetime.



--
Bertil Isberg - CTECH
Paradox buglist:
online: http://hem.bredband.net/bertilisberg/

"Thorak" <diving.bc (AT) gmail (DOT) com> skrev i meddelandet
news:1161632021.915298.288510 (AT) k70g2000cwa (DOT) googlegroups.com...
Quote:
I cant seem to get my odbc_result to work with a Paradox database TIME
field. My result always comes back as a date of 1899-12-30.... this is
driving me nuts, thats not a time... thats a date! It also always
returns the exact same date even if the time is different. All the
other odbc_results return the proper information..... just not the TIME
field.

Does anyone know what is going on?!




Reply With Quote
  #3  
Old   
Thorak
 
Posts: n/a

Default Re: Paradox DB and TIME field - 10-23-2006 , 05:09 PM



It is a paradox 5 database... and the field is a TIME field that im
trying to access. For some reason PHP's odbc_result gives back a DATE
as the data.... so im not sure how much control I have over the code
itself.

All I know is that its driving me bonkers.... your exactly right... it
SHOULD be impossible to get a DATE from a TIME field.... but I am!

ryan

Bertil Isberg wrote:
Quote:
From which database to you retrieve the records? Does that database have a
Time datatype?

Time and Dates are really only numbers presented as Time and Date, so time
and date are a display format. IMO, it should be impossible to get a Paradox
time field to display the result as a date. My guess is that the data is
returned as datetime.



--
Bertil Isberg - CTECH
Paradox buglist:
online: http://hem.bredband.net/bertilisberg/

"Thorak" <diving.bc (AT) gmail (DOT) com> skrev i meddelandet
news:1161632021.915298.288510 (AT) k70g2000cwa (DOT) googlegroups.com...
I cant seem to get my odbc_result to work with a Paradox database TIME
field. My result always comes back as a date of 1899-12-30.... this is
driving me nuts, thats not a time... thats a date! It also always
returns the exact same date even if the time is different. All the
other odbc_results return the proper information..... just not the TIME
field.

Does anyone know what is going on?!



Reply With Quote
  #4  
Old   
Bertil Isberg
 
Posts: n/a

Default Re: Paradox DB and TIME field - 10-24-2006 , 04:01 AM




If the ODBC driver returns a date instead of time, it's probably because
the driver doesn't support Paradox Time format , and thus translates it
to datetime.

--
Bertil Isberg
CTECH
Paradox Buglist: http://hem.bredband.net/bertilisberg/

remove spamfilter (reversed) to reply

Reply With Quote
  #5  
Old   
Thorak
 
Posts: n/a

Default Re: Paradox DB and TIME field - 10-24-2006 , 09:42 AM



Where would I find the right driver to solve this problem?!

I just used the ODBC driver that was in the list when setting up my
connection (one provided by windows).

thanks
ryan

Bertil Isberg wrote:
Quote:
If the ODBC driver returns a date instead of time, it's probably because
the driver doesn't support Paradox Time format , and thus translates it
to datetime.

--
Bertil Isberg
CTECH
Paradox Buglist: http://hem.bredband.net/bertilisberg/

remove spamfilter (reversed) to reply


Reply With Quote
  #6  
Old   
Anders Jonsson
 
Posts: n/a

Default Re: Paradox DB and TIME field - 10-24-2006 , 12:38 PM



Quote:
Where would I find the right driver to solve this problem?!

I just used the ODBC driver that was in the list when setting up my
connection (one provided by windows).

I did a test from Excel using an ODBC connection to a Paradox table using a
Microsoft Paradox driver (for version 5). The table was Paradox version 7.

The time fields all came back as datetime with the "date" "1900-01-00'
followed by the correct time. When I format the result as time in Excel I
get the correct result. If I format as numeric I get a decimal and if I
multiply that with 24 I get the time of day in decimal form (12.5 meaning
12:30:00)

Bottom line, I think what you get back will be possible to use if you just
can figure out what you actually see.



Anders





Reply With Quote
  #7  
Old   
Thorak
 
Posts: n/a

Default Re: Paradox DB and TIME field - 10-24-2006 , 03:49 PM



I can produce the same result in excel (good idea by the way)... but
not with PHP.... grrrr!

I did a var dump from PHP of the raw data and get the following:
ie
var_dump($DueDate);
var_dump($DueTime);

echo's
string(10) "2006-06-15"
string(10) "1899-12-30"

string(10) "2006-07-07"
string(10) "1899-12-30"

string(10) "2006-08-21"
string(10) "1899-12-30"

string(10) "2006-08-23"
string(10) "1899-12-30"

string(10) "2006-09-08"
string(10) "1899-12-30"

string(10) "2006-09-13"
string(10) "1899-12-30"

etc etc

wierd that I dont get a time in any of that - proper date from the DATE
field but why I get a freakin date from the TIME field confuses me
still!



Anders Jonsson wrote:
Quote:
Where would I find the right driver to solve this problem?!

I just used the ODBC driver that was in the list when setting up my
connection (one provided by windows).


I did a test from Excel using an ODBC connection to a Paradox table using a
Microsoft Paradox driver (for version 5). The table was Paradox version 7.

The time fields all came back as datetime with the "date" "1900-01-00'
followed by the correct time. When I format the result as time in Excel I
get the correct result. If I format as numeric I get a decimal and if I
multiply that with 24 I get the time of day in decimal form (12.5 meaning
12:30:00)

Bottom line, I think what you get back will be possible to use if you just
can figure out what you actually see.



Anders


Reply With Quote
  #8  
Old   
Bertil Isberg
 
Posts: n/a

Default Re: Paradox DB and TIME field - 10-24-2006 , 04:24 PM



<<
string(10) "1899-12-30"
Quote:
And string(20) to get both date and time?

--
Bertil Isberg - CTECH
Paradox buglist:
online: http://hem.bredband.net/bertilisberg/

"Thorak" <diving.bc (AT) gmail (DOT) com> skrev i meddelandet
news:1161722945.700402.67720 (AT) k70g2000cwa (DOT) googlegroups.com...
Quote:
I can produce the same result in excel (good idea by the way)... but
not with PHP.... grrrr!

I did a var dump from PHP of the raw data and get the following:
ie
var_dump($DueDate);
var_dump($DueTime);

echo's
string(10) "2006-06-15"
string(10) "1899-12-30"

string(10) "2006-07-07"
string(10) "1899-12-30"

string(10) "2006-08-21"
string(10) "1899-12-30"

string(10) "2006-08-23"
string(10) "1899-12-30"

string(10) "2006-09-08"
string(10) "1899-12-30"

string(10) "2006-09-13"
string(10) "1899-12-30"

etc etc

wierd that I dont get a time in any of that - proper date from the DATE
field but why I get a freakin date from the TIME field confuses me
still!



Anders Jonsson wrote:
Where would I find the right driver to solve this problem?!

I just used the ODBC driver that was in the list when setting up my
connection (one provided by windows).


I did a test from Excel using an ODBC connection to a Paradox table using
a
Microsoft Paradox driver (for version 5). The table was Paradox version
7.

The time fields all came back as datetime with the "date" "1900-01-00'
followed by the correct time. When I format the result as time in Excel I
get the correct result. If I format as numeric I get a decimal and if I
multiply that with 24 I get the time of day in decimal form (12.5 meaning
12:30:00)

Bottom line, I think what you get back will be possible to use if you
just
can figure out what you actually see.



Anders




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.