0

I have an application made in VBNET that is working very well with SQL Server 2008. However, now bought a shared accommodation on the internet and wanted to get to work directly with the online database. The server has installed SQL Server 2014, I made a dump of the database that had already locally and can access through my program but I get the error "conversion failed When converting date and / or team from character string". What do you think can be or what can I do to fix this error?

  • Welcome to StackOverflow Carlos. Please read this: http://stackoverflow.com/help/mcve and http://stackoverflow.com/help/how-to-ask You will need to provide some data, show what you have tried, what your output is and what your expected output it. Without seeing the data, all we can do is speculate based on the error--but in short it seems like you have your date stored in a format which SQL Server doesn't recognize. This error should have happened on 2008 as well though, so it's likely your application. See, speculation. – S3S Oct 26 '16 at 20:27
  • Your question is not very clear. When is it that you receive this error? Is it when importing data into the SQL 2014 database? Or is it in your app that is now connected to the SQL 2014 database? You will need to show us examples of your data as well. – squillman Oct 26 '16 at 20:27
  • Could be the language settings. I would compare both versions' settings and research how language settings might affect date conversions. – BJones Oct 26 '16 at 20:32
  • Have a check would be the default language for the user you are using to connect (British English vs US English). The may be different between your servers if its using the DB/server default – LordBaconPants Oct 26 '16 at 21:17

1 Answers1

0

First, try solution proposed in this post:

Conversion failed when converting date and/or time from character string while inserting datetime

There are many formats supported by SQL Server - see the MSDN Books Online on CAST and CONVERT. Most of those formats are dependent on what settings you have - therefore, these settings might work some times - and sometimes not.

if that doesn't help, please provide more information so the community can help you.

Community
  • 1
  • 1
Marcin Bator
  • 341
  • 1
  • 8
  • 23