Skip site navigation (1) Skip section navigation (2)

Re: issue with an assembled date field

From: Chris Bowlby <excalibur(at)accesswave(dot)ca>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: issue with an assembled date field
Date: 2008-02-29 19:07:11
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
ho Tom, 

 Thanks that gave me the brain burp I needed to click into what was
causing the root issue.

On Fri, 2008-02-29 at 13:47 -0500, Tom Lane wrote:
> Chris Bowlby <excalibur(at)accesswave(dot)ca> writes:
> >  I am converting an encoded field (lot_id) into a date field, the 5
> > character of every lot_id is always the year and as such I need to
> > extract the year using the following function:
> >  substring(ilch.lot_id::text, 5, 1)
> Well, I'd say that the failure proves that some of your data does
> *not* have the year in the fifth character.
> > ERROR:  invalid input syntax for type date: "01/01/0W"
> Time for some data sanitizing?
> 			regards, tom lane

In response to

pgsql-general by date

Next:From: Martin GaintyDate: 2008-02-29 19:18:06
Subject: Re: issue with an assembled date field
Previous:From: Richard HuxtonDate: 2008-02-29 19:04:17
Subject: Re: Insert vs Update syntax

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group