sql server 2008 - Dates Being sent to SQL in many different formats, how do i handle this? -


i i'm busy editing stored procedures reports created while back. encountered problem parameters being sent stored procedures comes in kinds of funky formats multiple computers.

some of formats have encountered has been

'2017-01-31'

'2017-31-01'

'01-01-2017'

'31012017'

'20170131'

i desperately need way handle these different formats. '31012017' gives me input error doesnt want reach converter made input parameter varchar(15) take kinds of inputs.

you can make educated guesses on date format, there's limit on how can guess.

canonical dates ussually iso compatible yyyy-mm-dd - i've never seen 2017-31-01.

the problem when 11-11-2011 or - worse - 10/11/12. there's no way figure out if have no additional information.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -