Just FYI, there is a small edge-case in that approach if the db stores time
with microseconds.
If that's the case, you may be better off comparing to a 'floored" date
column, or using a search where you grab values ">=" the start and "<" the
end. Otherwise you'll miss values that happen
Thanks. I added a time part to the datetime.datetime object as:
end_dt =
datetime.datetime.combine(pd.Timestamp(form.to_dt.data).to_datetime(),
datetime.time(23,59,59))
Then I passed end_dt to the query. it works great.
--
You received this message because you are subscribed to the Google
Ok. How do you guys suggest I make the query to capture results for the end
point date?
--
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
On Tue, Mar 1, 2016 at 4:17 PM, Nana Okyere 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
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
On 02/29/2016 06:01 PM, Nana Okyere wrote:
I have a model and one of its attributes is a column
called last_updated_timestamp . It is a date column set
to datetime.datetime.now() . That's all good.
I'm trying to query for some roles based on a date range. So I do:
results =
I have a model and one of its attributes is a column
called last_updated_timestamp . It is a date column set
to datetime.datetime.now() . That's all good.
I'm trying to query for some roles based on a date range. So I do:
results =