Re: Y2K problem with sysdate

From: Erwin Dondorp <erwindon_at_wxs.nl>
Date: Thu, 06 Jan 2000 22:16:24 +0100
Message-ID: <38750628.7B70184D_at_wxs.nl>


Deepa Dinendra wrote:
> My Pro*c programs which were not having any problems with dates before
> 01-jan-2000 is failing where ever there is sysdate function call.
>
> I tried the following:
> today varchar[15];
>
> EXEC SQL select sysdate into :today from dual;
> printf("Today is %s \n", today.arr);
>
> The result I obtained is
> Today is 05-JAN-015:20

Perhaps not the real problem,
but since when is a varchar \0 terminated? You use printf with %s...
shouldn't the line "today.arr[today.len] = '\0';" be added just before printing?

-- 
Erwin Dondorp
<http://www.dondorp.com/>
Received on Thu Jan 06 2000 - 22:16:24 CET

Original text of this message