Unix Timestamp conditions

Hello everyone, Im trying to build a select statement rn but u dont get it done and could need some help. I have a database (turso sqlite) where i store timestamps in the unix epoch format (like: 1702132073000). Now i want to select all rows where the timestamp is TODAY so only compare the date and ignore the time. how can i do this? Thanks everyone!
2 Replies
Angelelz
Angelelz13mo ago
You can do .where(and(gt(table.timestampColumn, <today's timestamp at midnight>), lt(table.timestampColumn, <tomorrow's timestamp at midnight>)))
louis
louisOP13mo ago
Thx! I will try it out thx, it worked
Want results from more Discord servers?
Add your server