IanWaterman
Programmer
I have a string date stored as
ddmmyy
When I use cast with the field = 080912
Cast(EffectiveDate as Date) I get 2008-09-12 00:00:00
I have solved this by breaking down
cast(SUBSTRING(EffectiveDate,5,2)+SUBSTRING(EffectiveDate,3,2)+SUBSTRING(EffectiveDate,1,2) as DATE)EffDate,
This gives me the correct result but looks a bit convoluted is there a more efficient way?
Thank you
Ian
ddmmyy
When I use cast with the field = 080912
Cast(EffectiveDate as Date) I get 2008-09-12 00:00:00
I have solved this by breaking down
cast(SUBSTRING(EffectiveDate,5,2)+SUBSTRING(EffectiveDate,3,2)+SUBSTRING(EffectiveDate,1,2) as DATE)EffDate,
This gives me the correct result but looks a bit convoluted is there a more efficient way?
Thank you
Ian