Обсуждение: Help with postgres functions

Поиск
Список
Период
Сортировка

Help with postgres functions

От
Fabio Alberto Sobral
Дата:
Dear Sirs,

   I have a timestamp atribute in my table and I want to get only the date of
this atribute. How can I do this? Does the extract or date_part functions
resolve my problem?

Regards,

Fabio Sobral.



Re: Help with postgres functions

От
Karel Zak
Дата:
On Thu, Apr 19, 2001 at 10:04:42AM -0300, Fabio Alberto Sobral wrote:
> Dear Sirs,
>
>    I have a timestamp atribute in my table and I want to get only the date of
> this atribute. How can I do this? Does the extract or date_part functions
> resolve my problem?

Cast timestampt to date:

        myAttr::date
or
        CAST(myAttr as date)


                                Karel