Date Conversion

Database
Enthusiast

Date Conversion

Hi All,

 

I am extracting a Float data type field from SQL server - legacy source and have fast loaded the data into Teradata. The field have date values  ( not sure as why they have defined it has float). I would like to convert the data into date in Teradata before loading it to the target table.

 

Below are few values. There are values like  '2105376' which I will be ingnoring based on the length of the field > 6 characters. I just wanted to convert this to date with the proper year to 'YYYYMMDD'

10707
260598
61298
301298
2105376
300501

 

Appreciate if some could help me to convert this.

 

Thanks

 

2 REPLIES
Highlighted
Senior Apprentice

Re: Date Conversion

Is this ddmmyy?

 

 

What is the "proper" date/year for

10707 = 2001-07-07?
260598 = 1998-05-26?

 What rules exist for conversion?

 

Enthusiast

Re: Date Conversion

Hi Dieter,

 

Yes below is true. The date for 10707 is '2001-07-07'. The first two digit is date followed by the next two for month and the last two digits for year. This is a legacy system and there is no SME for this system. Based on the input from a BA, the field is in ddmmyy format. However he does not know as why this is stored in Float datatype.

 

What is the "proper" date/year for

10707 = 2001-07-07? 
260598 = 1998-05-26?

 What rules exist for conversion?