Hi folks,
I’d like to update a Postgres row with the current time after a step has been completed, but I am having trouble passing the date in as a valid attribute for an item.
In a “Function Item” node, if I set a date field using something like this, either as a date object or a string:
item.updated_at = new Date();
or
item.updated_at = new Date().toISOString()
Then in the “Postgres” node, I do an update on my table, then I get a standard Postgres error back that the type of updated_at is a string, not a timestamp.
How do you correctly transform/represent a date attribute of an item in an update in the Postgres node?
Or is there another node that I should be using to write to the database? I’ve seen other posts where there is raw SQL being shared, but I can’t see where I would input that using the n8n user interface.
Hope someone can point me in the right direction! Thanks!