Re: date_part???

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: jerome <jerome(at)gmanmi(dot)tv>
Cc: PostgresGeneral <pgsql-general(at)postgresql(dot)org>
Subject: Re: date_part???
Date: 2002-08-29 11:32:01
Message-ID: 20020829213201.C32113@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

How about just:

SELECT date_part('hour', test) from testing;

On Thu, Aug 29, 2002 at 05:30:31PM +0800, jerome wrote:
> i have a table
> Attribute | Type | Modifier
> -----------+-----------+----------
> test | timestamp |
>
> SELECT date_part('hour', TIMESTAMP 'timestamp(test)') from testing;
> ERROR: Bad timestamp external representation 'timestamp(test)'
>
> ** this one gives me an error but the DOCU says:
> -- date_part(text, timestamp)
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2002-08-29 11:33:37 Re: Tuple, table, database object identifiers size
Previous Message Jean-Christian Imbeault 2002-08-29 11:25:11 Data Type to represent a year/month value