Querying records from last 7 days using 'YYYY-MM-DD' format

Hi there,

I'm a bit stuck and would love some help โ€” I'm trying to query only the records from the last 7 days from our Plaid database table. Plaid only provides the date of a transaction, not a timestamp, so we've been saving this data as a date field with 'YYYY-MM-DD'.

In theory, the query should be as simple as this, however comparing dates and timestamps isn't working, and I can't seem to figure out an easy way to cast the plaid_transaction.date field to a timestamp.

Any suggestions?


Jack

Other
5 replies