Home CASTing and converting functions in SQL Server
Reply: 0

CASTing and converting functions in SQL Server

user388
1#
user388 Published in May 25, 2018, 2:22 pm

I am trying to convert dd.mm.yyyy to yyyy-mm-dd.

select convert(date,CAST(WEEK_DATE as nvarchar(220)), 120) 
from z_fact

Error

Msg 241, Level 16, State 1, Line 1
Conversion failed when converting date and/or time from character string.

How can I resolve this?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.305802 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO