Supabase: cannot remove date from table

I have a Delivery date Date and Time picker on some pages. Saving the date in the database works fine but I cannot remove it anymore. I.e. I have a workflow which removes the date after clicking on the cross icon:

image

The Remove date workflow sets the date to null:
image

There is an error on saving the record:

"Error: invalid input syntax for type timestamp with time zone: “null”

I also tried many other formulae but none works. For example:
image

This formula doesn’t throw an error but also does not remove the date:
image

I’ve now found a workaround: The “Remove date” workflow (clicking on the cross) saves null in the database.

However, the “Save complete record in the database” workflow still throws an error:
image

Most important for now: removing the date or saving a date works.

But I still would like to know how this is possible using a formula.

Hi @BertrandG :wave:

Based on the message you shared (Error: invalid input syntax for type timestamp with time zone: “null”), it seems like the date field in Supabase doesn’t allow nullable.

Can you check the field you are trying to update with null is configured to accept that value in Supabase?

Hi Joyce,
It’s nullable. I guess the issue is that the cleared datetime picker doesn’t return null but only “”. My workaround works (saving null in the table in the “Click on cross” workflow) but I’d like to have a formula which doesn’t need it (currently the record must be saved twice).