Solved

MS SQL script conversion error in dates

Posted on 2016-11-02
3
34 Views
Last Modified: 2016-11-02
Hi,

We are attending a central america site and when we run a script develop in our US site, it gives the error:

Msg 242, Level 16, State 3, Line 1
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.

Open in new window


So we think its the sql instance at thier end.

Question, how to convert our script to follow their region dates
0
Comment
Question by:rayluvs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:rayluvs
ID: 41870087
Ok other words our format is mm/dd/yyyy thier format date is dd/mm/yyyy.

FYI
0
 
LVL 49

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 41870098
SQL Server engine always stores the data as YYYYMMDD. The format is a client side so if you want to perform any operation internally convert always to YYYYMMDD no matter the country the server is.
0
 

Author Closing Comment

by:rayluvs
ID: 41870161
Thanx!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
converting integer data type to time data type in sql 4 47
Need sql in string 2 29
Searching a barcode number within a string. 7 25
Need multiple Group By's 8 26
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question