How do I filter with date in SQLite (Turso)

I can't find an answer in the docs but I have a timestamp defined in my schema like this

updatedAt: text('updated_at').default(sql``(CURRENT_TIMESTAMP)``).notNull(),

I'm trying to see whether this timestamp was in the last 24 hours but because the type is seen as a string it won't let me check it with Date and lt etc.

What am I missing? Thanks.
Solution
Sorry for long response @Matt. You might convert this field into date in your application and do your filters.

Also, there will be soon date mode for the text data type in sqlite, so this field will be already returned as Date object from drizzle.
Was this page helpful?