Hey guys, is there a way to have the Current date ...
# help
x
Hey guys, is there a way to have the Current date as default value of a column in supabase?
n
Hello ! This thread has been automatically created from your message in a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
x
I tried
CURRENT_DATE
but it didn't worked…
g
If you are talking on postgres side ... now()
n
xavier (2022-03-28)
x
I need a date, now() will give something like
2022-02-21
?
g
Ah, that is for a timestamp column
x
Yes, that's what I thought. I would like the same but for a Date
g
If your column is date type that works too.
x
Hum, it didn't. I might have a bug elsewhere. Let me check
g
Hard to see, but column gets 2022-03-28
x
Works!
Thanks man!
r
Careful! What timezone do you want the date to be in? Make sure it will do what you're expecting!