Solved

MS SQL script conversion error in dates

Posted on 2016-11-02
3
26 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
  • 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 46

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

[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

Question has a verified solution.

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

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how the fundamental information of how to create a table.

895 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now