K
K
kolaluka2021-01-27 22:14:12
PostgreSQL
kolaluka, 2021-01-27 22:14:12

How to write date without year?

How to store date in database without year if possible? Or how to get all records from January 1st to January 31st for all years? Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2021-01-27
@kolaluka

A date can be stored using the date type (date only, no time) or a timestamp. Records for January can be selected by the appropriate condition using DATE_PART - DATE_PART('month' ...etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question