Thread: ERROR: date/time field value out of range: "28/05/2004 02:15:57"

I'm runnig Redhat 7.3 with postgresql 7.3.4 builded from sources and
upgraded recently. I receive this error ( never received before upgrade
) and I don' t know what to do.

Error while executing the query; ERROR: date/time field value out of
range: "28/05/2004 02:15:57"

SQL = "insert into

kleweshp_pror(prcod_id,prdatord,prcodcli,prcodage,prcodlis,prcodval,prscocl1,prscocl2,prcodart,prqtaord,prprezzo,prdateva,prscont1,prscont2,prscont3,prscont4,prcoddes,prconprg,prflgcon,prstaord)

values (1,'28/05/2004
02:15:57','14100001','','00001','EUR',0.00,0.00,'F15012711 ',2.000,
48.60000,null,-40.00,-15.00,0.00,0.00,'001 ','','','P')"


In my log the message is :

ERROR:  date/time field value out of range: "28/05/2004 02:15:57"
HINT:  Perhaps you need a different "datestyle" setting.

I've tried change datestyle to Postgresql, European, and so, but nothing
happend.

Can you help me ?

    Ciao, Samu.





Re: ERROR: date/time field value out of range: "28/05/2004 02:15:57"

From
Rory Campbell-Lange
Date:
On 28/05/04, kaka (kaka@darpha.com) wrote:
> I'm runnig Redhat 7.3 with postgresql 7.3.4 builded from sources and
> upgraded recently. I receive this error ( never received before upgrade
> ) and I don' t know what to do.
>
> Error while executing the query; ERROR: date/time field value out of
> range: "28/05/2004 02:15:57"
>
> SQL = "insert into
>
kleweshp_pror(prcod_id,prdatord,prcodcli,prcodage,prcodlis,prcodval,prscocl1,prscocl2,prcodart,prqtaord,prprezzo,prdateva,prscont1,prscont2,prscont3,prscont4,prcoddes,prconprg,prflgcon,prstaord)

> values (1,'28/05/2004
> 02:15:57','14100001','','00001','EUR',0.00,0.00,'F15012711 ',2.000,
> 48.60000,null,-40.00,-15.00,0.00,0.00,'001 ','','','P')"
>
Looks like there is a return in your date data. Also, is it a date field
or a timestamp field? What happens if you insert '2004-05-28'?

Rory
--
Rory Campbell-Lange
<rory@campbell-lange.net>
<www.campbell-lange.net>

Re: ERROR: date/time field value out of range: "28/05/2004 02:15:57"

From
Rory Campbell-Lange
Date:
On 28/05/04, kaka (kaka@darpha.com) wrote:
> It' s not a return or so stupid problem. If I put 2004-05-28 It works
> perfectly. I don't want date in this format!

> Rory Campbell-Lange ha scritto:
> >On 28/05/04, kaka (kaka@darpha.com) wrote:
> >>Error while executing the query; ERROR: date/time field value out of
> >>range: "28/05/2004 02:15:57"
> >>
> >>SQL = "insert into
>
>>kleweshp_pror(prcod_id,prdatord,prcodcli,prcodage,prcodlis,prcodval,prscocl1,prscocl2,prcodart,prqtaord,prprezzo,prdateva,prscont1,prscont2,prscont3,prscont4,prcoddes,prconprg,prflgcon,prstaord)

> >>values (1,'28/05/2004
> >>02:15:57','14100001','','00001','EUR',0.00,0.00,'F15012711 ',2.000,
> >>48.60000,null,-40.00,-15.00,0.00,0.00,'001 ','','','P')"

What does \d kleweshp_pror say?
--
Rory Campbell-Lange
<rory@campbell-lange.net>
<www.campbell-lange.net>