Re: Cast: timestamp to integer

From: Rory Campbell-Lange <rory(at)campbell-lange(dot)net>
To: 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 16:57:50
Message-ID: 20030612165750.GC29267@campbell-lange.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message MT 2003-06-12 16:58:12 Best pg_dump practices
Previous Message Mike Mascari 2003-06-12 16:45:44 Re: Temp tables, indexes and DELETE vs. TRUNCATE