Date time conversion error

  • Hi,

    I have a stored proc which inserts date time. It inserts successfully. But 2 PM afternoon, it gives me date time converion error. The next day it works fine. But daily after 2 PM, it gives error converting varchar to date time error:crazy::angry:

    The weird thing is its showing this error only in one of the server, which is live server. Whereas it works fine else where in other servers.

    The server level setting is US English, the logins used are US English.

    Any idea where to look pls?

  • Can you show us some of the data that is failing?

  • 15/02/2013 04:25:57

    21/02/2013 02:25:57

    these are non working

  • can you plz send the script the you are using for this?

    To get quick answer follow this link:

  • Please check the below points too:

    1. what is you DB server time zone & web server time zone

    2. Are you inserting datetime variable or a varchar variable data

    3. As you are saying that you got error while inserting data, I think you are using varchar string as input. So, please check the server time zone (ddmmyyy) or (mmddyyy).

    I hope this can help.

  • cmrhema (2/22/2013)

    15/02/2013 04:25:57

    21/02/2013 02:25:57

    these are non working

    These are invalid dates for US English settings.

  • Thanks all for the inputs.

    Found out the reason.

    We have created a different service account for various applications.

    And there is one service account that was used across three applications in three different servers.

    And in one of the server the language setting was different:w00t:

    This was the issue, we have added the "language" in our connection string, to override the differences.

    Thanks all

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply