shinriyo wrote:
hi jo

Oracle and PostgreSQL are different.
Oracle also have hour and minutes and second.

If you want minutes and second on PostgresQL, you should use datetime.


Hi shinryo,

I don't want hours and minutes.
My problem is that I have a comparison in my code like this:

if   data_inizio > data_fine:
    ...

TypeError: can't compare datetime.datetime to datetime.date

--------------

data_inizio  is a value returned by:
Frazione.get(31).tariffa_data_inizio # returns an object datetime.date (both oracle and pg)

data_fine is a value returned by engine: #oracle returns a datetime while pg returns a date engine.connect().execute('select data_fine from tariffa where id_frazione=31').fetchone()


I would like to know why Oracle engine returns dates as datetime.datetime instead of datetime.date and if there is a way to have the same behavior between oracle and pg in such case.

j

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

Reply via email to