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
Angelelz12mo ago
You can do .where(and(gt(table.timestampColumn, <today's timestamp at midnight>), lt(table.timestampColumn, <tomorrow's timestamp at midnight>)))
louis
louisOP12mo ago
Thx! I will try it out thx, it worked
Want results from more Discord servers?
Add your server