Changes in date handling - 9.21 and 9.40.UC1
Posted in 2003
Topics: Data Types & Schema Design
It
seems that Informix's handling of date casting/calculations has changed
somewhat...has anyone else seen this ? If I perform ths following query on
9.21, it works.
select (today + 1 units day)::varchar(255)::date from systables where tabid=1
> 2003-07-19
Under 9.40....
select (today + 1 units day)::varchar(255)::date from systables where tabid=1
> 1218: String to date conversion error
> Error in line 1> Near character position 77
Has anyone else noticed this, or have any sort of fix for it ?
Hi Peter,
Why you are using the SELECT as below, is there any specific reasons to use
like this.?
select (today + 1 units day)::varchar(255)::date from systables where tabid=1
You can try out the below one, it'll work in all the versions...
SELECT (today + 1) FROM systables WHERE tabid = 1;
Regards,
Ravi Shankar N.
-----Original Message-----
From: PETER SKIPWORTH [mailto:pskipworth@touchcorp.com]
Sent: Friday, July 18, 2003 10:29 AM
To: ids@iiug.org
Subject: Changes in date handling - 9.21 and 9.40.UC1 [1570]
It seems that Informix's handling of date casting/calculations has changed
somewhat...has anyone else seen this ? If I perform ths following query on
9.21, it works.
select (today + 1 units day)::varchar(255)::date from systables where tabid=1
> 2003-07-19
Under 9.40....
select (today + 1 units day)::varchar(255)::date from systables where tabid=1
> 1218: String to date conversion error
> Error in line 1> Near character position 77
Has anyone else noticed this, or have any sort of fix for it ?