Thanks Bob, at least now I understand why it is happening. The problem that I
have a generic piece of software to produce reports from such a database. It
doesn't *know* what types the fields are, so it asks for the column data type
before deciding how to interpret the result. From what you are saying, it would
appear that what I am trying to do is impossible, unless maybe I fudge the
reporting software so that if it detects a timestamp type, AND the source is MS
Access then retrieve the data first as a timestamp, then as a double to figure
out which bit to use. At the moment, I've modified the database so that they are
both straight text fields, but it doesn't make me happy.
Anyway, thanks again.
>In Access, it is not possible to distinguish between date and time.
>Both are treated as timestamps. Access ALWAYS stores a time element
>along with the date. Internally, Access uses a double which encodes
>the date in the whole number part and the time in the fractional part.
>If the date is returned as 0, and the time part is > 0, you know you
>are dealing with a time value (I believe 0 would be equivalent to Dec.
>31, 1899 ... earlier dates are negative numbers).
>If you are querying with ODBC functions, as it seems to be the case,
>just bind the column to an SQL_TYPE_TIMESTAMP structure (or retrieve
>as character data) and throw away whatever you aren't interested in.
-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
http://www.newsfeed.com The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----