I found this article when struggling to figure out how to get a date into Supabase. For me the solution was to convert it to iso format first. Python snippet:
def convert_date_to_iso(datetime_string): return datetime.strptime(datetime_string, DATE_FORMAT).isoformat()
And then the insert:
data = supabase.table("mytable").insert({ "timestamp": convert_date_to_iso(datetime_string) }).execute()
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I found this article when struggling to figure out how to get a date into Supabase. For me the solution was to convert it to iso format first. Python snippet:
And then the insert: