date with month and year - Mailing list pgsql-general

From Daniel Torres
Subject date with month and year
Date
Msg-id CAJGorGyMC0n5x9Zow+sn2Tc5z4STjPGyHHiBHaHqugx9FC0fCw@mail.gmail.com
Whole thread Raw
Responses Re: date with month and year
Re: date with month and year
Re: date with month and year
Re: date with month and year
Re: date with month and year
List pgsql-general
I everybody, I'm new in the Postgresql world, and have an easy question: Is it possible to have date type data that only contain month and year?, how can I obtain that from a timestamp (without time zone) column?

I've made this, but I think the result is a text, not a date

select extract (Year from '2001-05-01 20:21:00'::TIMESTAMP WITHOUT TIME ZONE)||'-'|| extract(Month from '2001-05-01 20:21:00'::TIMESTAMP WITHOUT TIME ZONE);



Any help is welcome, thanks

Daniel

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Replicate over pgbouncer?
Next
From: John McKown
Date:
Subject: Re: date with month and year