Answer the question
In order to leave comments, you need to log in
Find how many days a user has been registered?
Hey! In the postgres table, I have a registration date in the format 2021-12-16 12:34:58.956416
How can I calculate how many FULL days have passed since the date of its registration?
i.e. 1 day 2 hours rounded up to 2 days.
Answer the question
In order to leave comments, you need to log in
select extract('day' from now() - '2021-12-16 12:34:58.956416'::timestamp);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question