# Supabase: cannot remove date from table

**URL:** <https://community.weweb.io/t/supabase-cannot-remove-date-from-table/8767>\
**Category:** Ask us anything\
**Tags:** supabase\
**Created:** [May 24, 2024, 12:39pm UTC](https://community.weweb.io/t/supabase-cannot-remove-date-from-table/8767 "2024-05-24T12:39:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BertrandG](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/bertrandg/32/5129_2.png) [@BertrandG](https://community.weweb.io/u/BertrandG)\
**Post date:** [May 24, 2024, 12:39pm UTC](https://community.weweb.io/t/supabase-cannot-remove-date-from-table/8767/1 "2024-05-24T12:39:08Z")

</div>

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](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/d/d3359a86dabec080b786b68921d1d87e995758e8.png)

The Remove date workflow sets the date to null:  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/c/ce41422705aeb3b3d746578fc295f343a25e1653.png)

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](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/f/f76d1d6915734f8e433855ec8809c4b00ea3a52f.png)

This formula doesn’t throw an error but also does not remove the date:  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/e/ec91f85ca852214cf3bac92f0fbb7237b1aa75f3.png)

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](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/7/76ad2d769d19aa66ed9b09f307b7c12003b465b6.png)

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.

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [May 24, 2024, 3:16pm UTC](https://community.weweb.io/t/supabase-cannot-remove-date-from-table/8767/2 "2024-05-24T15:16:52Z")

</div>

Hi @BertrandG 👋

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?

 ![CleanShot 2024-05-24 at 17.15.24@2x](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/b/b75c6469f1b111e24f1007e561826c8320396f6b.png)

---

<div class="post-metadata">

**Author:** ![BertrandG](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/bertrandg/32/5129_2.png) [@BertrandG](https://community.weweb.io/u/BertrandG)\
**Post date:** [May 26, 2024, 12:35pm UTC](https://community.weweb.io/t/supabase-cannot-remove-date-from-table/8767/3 "2024-05-26T12:35:04Z")

</div>

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).
