Not clear on objective to convert date into NUMERIC first and then in the format dd/mm/yyyy.......why not directly to dd/mm/yyyy format?
This may be the solution you are looking for.....
1. Import the raw data as it is in the table.
2. UPDATE <TableName>
SET ReportDate='0'+ReportDate
WHERE LEN(REportDate)=7
3. UPDATE <TableName>
SET ReportDate = LEFT(ReportDate,2)+'/'+SUBSTRING(ReportDate,3,2)+'/'+RIGHT(ReportDate,4)
Cheers,
Pooja Falor
|