On Dec 2, 2009, at 1:26 PM, Ian Kelly wrote:

> On Wed, Dec 2, 2009 at 7:49 AM, Michael Bayer <[email protected]> 
> wrote:
>> Oracle's DATE type stores time information as well:
>> 
>> http://it.toolbox.com/blogs/database-solutions/a-comparison-of-oracles-date-and-timestamp-datatypes-6681
>> 
>> DateTime is a generic type that indicates a date that could be historic or 
>> in the future, so uses DATE on oracle (PG only has TIMESTAMP available).   
>> TIMESTAMP is more like a "system time" value.
> 
> TIMESTAMP supports the full range of values that DATE does.  The only
> major difference that I'm aware of is that TIMESTAMP supports
> fractional second precision, and DATE does not.

from the article:

 Beware while the TO_CHAR function works with both datatypes, the TRUNC 
function will not work with a datatype of TIMESTAMP. This is a clear indication 
that the use of TIMESTAMP datatype should explicitly be used for date and times 
where a difference in time is of utmost importance, such that Oracle won't even 
let you compare like values.

this suggests to me that DATE is more of a general purpose date/time type 
whereas TIMESTAMP is specifically when you need granularity to compare the 
ordering of events down to the millisecond, with some loss in simplicity .


--

You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.


Reply via email to