I am trying to convert a date from DDMMYY
format to datetime
in SQL Server.
I am using the convert
command as follows
select convert (datetime, '311012', <style>)
I have tried looking on msdn for the supported styles but haven't found an exact match.
Help will be much appreciated.
select convert (datetime, Stuff(Stuff('311012',5,0,'.'),3,0,'.'), 4)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With