Date Conversion
Posted in 1995
I'm trying to move dates from a CHAR datatype to a DATE one. I keep
either getting -1212 (Date conversion must contain a year, a month and a
day), or the target field ending up null.
I've checked all the obvious things like DBDATE (it's ymd2) and I've
tried it with or without the date() function. Am I just missing something
really dumb? For example, the following stored procedure generates a
-1212 on the 'let p_date...' statement:
create procedure date_test() returning date,char(12);
define p_date date;
define p_string char(12);
let p_string = "950101";
let p_date = date(p_string);
return p_date, p_string;
end procedure;
Any clues?
akent@cix.compulink.co.uk (Andy Kent)
------------------------------------------------
Freelance Informix Database Specialist,
Redland, Bristol, England