From: | Arjen van der Meijden <acm(at)tweakers(dot)net> |
---|---|
To: | 'Rory Campbell-Lange' <rory(at)campbell-lange(dot)net>, 'Michal Durys' <joe(at)anime(dot)com(dot)pl> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Cast: timestamp to integer |
Date: | 2003-06-12 17:03:06 |
Message-ID: | 003401c33104$88f9d350$3ac15e91@acm |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Why not use EXTRACT ?
Arjen
> -----Oorspronkelijk bericht-----
> Van: pgsql-general-owner(at)postgresql(dot)org
> [mailto:pgsql-general-owner(at)postgresql(dot)org] Namens Rory Campbell-Lange
> Verzonden: donderdag 12 juni 2003 18:58
> Aan: Michal Durys
> CC: pgsql-general(at)postgresql(dot)org
> Onderwerp: Re: [GENERAL] Cast: timestamp to integer
>
>
> select cast(to_char(current_timestamp, 'd') as integer)/5;
>
> On 12/06/03, Michal Durys (joe(at)anime(dot)com(dot)pl) wrote:
> > I'd like to convert timestamp and date fields to intergers.
> > Unfortunately cast() says it's impossible:
> --
> Rory Campbell-Lange
> <rory(at)campbell-lange(dot)net>
> <www.campbell-lange.net>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
http://archives.postgresql.org
From | Date | Subject | |
---|---|---|---|
Next Message | David Wheeler | 2003-06-12 17:05:09 | ANNOUNCE: Bricolage 1.6.1 |
Previous Message | Csaba Nagy | 2003-06-12 17:01:06 | Re: Cast: timestamp to integer |