Re: Help with postgres functions

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Fabio Alberto Sobral <sobral(at)lncc(dot)br>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Help with postgres functions
Date: 2001-04-20 07:28:52
Message-ID: 20010420092852.A21932@ara.zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message tankgirl 2001-04-20 09:36:01 System Catalogs
Previous Message Jacopo Silva 2001-04-20 00:40:10 Re: Bugs in PostgreSQL v7.1 rpms for RedHat