How to Convert given text into the required date format in SqlServer : <p>I have an old database with a <a href="https://i.stack.imgur.com/bOLl4.png" rel="nofollow noreferrer">table with dateEntered(varchar datatype) column </a> which can take the dates in various formats like <br/>
A> 'wk231216' which means (Week)23-(Date)12-(Year)2016<br/>
B> '231216' which means (Week)23-(Date)12-(Year)2016<br/>
C> 'wk132717' which means (week)13-(Date)27-(year)2017<br/><br/>
 Now I need to modify the above dates into this format as 'YYYY-MM-DD'<br/><br/>
A> should become 2016-06-12(wk23 of 2016 is in June(06))<br/>
B> should become 2016-06-12<br/>
C> should become 2017-03-27<br/></p>

<p>Can anyone suggest how to achieve this?
Thank You!!</p>
