Problems with Year part in date

Database
Enthusiast

Problems with Year part in date

Hi All,

I have a SP like this

replace procedure temp(in indate date,out  temp varchar(100))
begin
set temp=indate;
end;

when i execute this SP, i am getting the date with year part contalining only two digits.

http://www.teradataforum.com/teradata/20050131_145553.htm

I am not facing any issues when i set the session and replace the proc and run.  

But is there any way we can handle it inside the proc?

2 REPLIES
Junior Contributor

Re: Problems with Year part in date

You can add a FORMAT phrase:

set date = indate (format 'yyyy-mm-dd')

Dieter

Enthusiast

Re: Problems with Year part in date

Thanks Dieter :)