On Tue, Mar 1, 2016 at 4:17 PM, Nana Okyere <oky...@gmail.com> wrote:
> Mike, thanks for your response. I turned on the echo to see the values. > Looks like it is passing a datetime.date objects. So I don't see a time > part of the date. Here's the relevant part of the echo output. > > I selected between two days ago and yesterday. It includes results for two > days ago but not results that match yesterday's date. > > WHERE work_force_planning_tab.last_updated_timestamp BETWEEN > :last_updated_times > tamp_1 AND :last_updated_timestamp_2 > 2016-03-01 10:12:36,229 INFO sqlalchemy.engine.base.Engine > {'last_updated_timest > amp_1': datetime.date(2016, 2, 28), 'last_updated_timestamp_2': > datetime.date(20 > 16, 2, 29)} > > I think Mike meant that the DATE type in the database itself stores the time as well: https://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm#i1847 Presumably you'll get the same result if you run something like this directly against the database: SELECT * FROM work_force_planning_tab WHERE last_updated_timestamp BETWEEN TO_DATE('2016/02/28', 'yyyy/mm/dd') AND TO_DATE('2016/02/29', 'yyyy/mm/dd') (I may have the syntax wrong - I don't use Oracle) Simon -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.