The dates are stored IE '20100331' in the source DB.
The destination DB dates are formatted as '2010-03-31'
One of the dates that gets imported in to the Destination DB is the current date + 3 months.
This is how i convert from '20100331' to '2010-03-31' + 3 months.
Code: Select all
substring(convert(varchar(10),rsOrder.ORDDATE),1,4) + '-' + substring(convert(varchar(10),rsOrder.ORDDATE + 300 ),5,2 ) + '-' + substring(convert(varchar(12),rsOrder.ORDDATE),7,2) as ORD_EXP_DATE,
Now if a date is 2009-11-10 it will result in 2009-14-10.
What do i do ?