Skip to content
Advertisement

Why does this date conversion cause an error? [closed]

Why does this fail?

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

Advertisement

Answer

Because format style = 1 means mm/dd/yy date format i.e. only a 2 digit year.

You want to use the 101 style.

See the complete list of formatting styles here source

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement