Re: Extract from date field - Mailing list pgsql-novice

From Thom Brown
Subject Re: Extract from date field
Date
Msg-id BANLkTimENTn+XcYQ6jxZM17hKLU1KBXoOw@mail.gmail.com
Whole thread Raw
In response to Re: Extract from date field  (Thom Brown <thom@linux.com>)
List pgsql-novice
On 18 June 2011 18:54, Thom Brown <thom@linux.com> wrote:
> So essentially you'd have to do something like:
>
> INSERT INTO camdengps2 (date_time, incident, camdencrimes_link)
> VALUES ('2011-04-18', 4, (to_char('2011-04-18'::timestamp, 'DDMMYYYY')
> || incident))::int);

Correction, that last bit shouldn't be incident but just 4 on its own
in order to demonstrate my point.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgsql-novice by date:

Previous
From: Thom Brown
Date:
Subject: Re: Extract from date field
Next
From: LALIT KUMAR
Date:
Subject: Compare dates