Cannot Insert Feb 29 2009 Leap Year value

Database
N/A

Cannot Insert Feb 29 2009 Leap Year value

Why can't I insert a '2008-02-29' value to a DATE FORMAT 'YYYY-MM-DD' column?
2 REPLIES
Teradata Employee

Re: Cannot Insert Feb 29 2009 Leap Year value

Hello,

It works fine. What error are you facing? Following example may be of some help:

CREATE VOLATILE TABLE Table1 (col1 DATE FORMAT 'YYYY-MM-DD') ON COMMIT PRESERVE ROWS;
INSERT Table1 VALUES ('2008-02-29');
SELECT * FROM Table1;

Regards,

Adeel

Re: Cannot Insert Feb 29 2009 Leap Year value

We can insert this date in table. Please find below query.

database xyz;

create table testdate

(d1 date);

N.B-default date format is 'YYYY-MM-DD'

insert into testdate values('2008-02-29')

1 row processed.

select * from testdate;

d1

2008-02-29

I tried it in Ansi as well as TD mode.

Please explain what exactly you want?

Regards,
Ravi.