• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 43
  • Last Modified:

MS SQL script conversion error in dates

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
rayluvs
Asked:
rayluvs
  • 2
1 Solution
 
rayluvsAuthor Commented:
Ok other words our format is mm/dd/yyyy thier format date is dd/mm/yyyy.

FYI
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
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
 
rayluvsAuthor Commented:
Thanx!
0

Featured Post

Technology Partners: 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!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now