Comparing datetime fields doesn't filter out rows #1427
Replies: 2 comments
-
Actually, it seems putting anything ( |
Beta Was this translation helpful? Give feedback.
0 replies
-
Closed, realize you cant use Python |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
Hi, I'm trying to retrieve all activities whose
time_start_UTC
andtime_end_UTC
fall betweencurrent_week
andend_of_current_week
(they are bothdatetime
objects in Python.current_week
is 2025-06-22 00:00:00 andend_of_current_week
is 2025-06-29 00:00:00).As you can see from the image below, the activity with title 'Shibuya Scramble Crossing' should have been filtered out by the query because its
time_end_UTC
comes after 2025-06-29 00:00:00. However, when I run the query it returns both rows in the table. For context I am using PostgreSQL.Am I comparing
datetime
fields incorrectly ? Please help me identify the issue.Operating System
Windows
Operating System Details
No response
SQLModel Version
0.0.24
Python Version
3.13.2
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions