![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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?! |
#3
| |||
| |||
|
|
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?! |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
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 |
#6
| |||
| |||
|
|
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). |
#7
| |||
| |||
|
|
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 |
#8
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |