declare @t table (a varchar(12)) insert @t values ('02.0...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Bicycles Meta

Q&A about the site for people who build and repair bicycles, people who train cycling, or commute on bicycles

declare @t table (a varchar(12))

insert @t values ('02.07.2008')
insert @t values ('2007-07-10')

select convert(date, a , case when charindex('-',a) = 5 then 121 else 103 end)
from @t

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results