pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Karel Zak <zakkr@zf.jcu.cz>
To: Fabio Alberto Sobral <sobral@lncc.br>
Cc: pgsql-admin@postgresql.org
Subject: Re: Help with postgres functions
Date: Fri, 20 Apr 2001 09:28:52 +0200
Message-ID: <20010420092852.A21932@ara.zf.jcu.cz> (raw)
In-Reply-To: <200104191304.f3JD4go15378@sealine.lncc.br>
References: <200104191304.f3JD4go15378@sealine.lncc.br>

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



view thread (2+ messages)

Message-ID: <20010420092852.A21932@ara.zf.jcu.cz>
Permalink:  ../20010420092852.A21932@ara.zf.jcu.cz/
Also on:    postgresql.org/message-id/20010420092852.A21932@ara.zf.jcu.cz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: zakkr@zf.jcu.cz, sobral@lncc.br
  Subject: Re: Help with postgres functions
  In-Reply-To: <20010420092852.A21932@ara.zf.jcu.cz>
  References: <200104191304.f3JD4go15378@sealine.lncc.br> <20010420092852.A21932@ara.zf.jcu.cz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox