Results 1 to 3 of 3

Thread: DatesDatesDatesDatesDatesDatesDatesDatesDatesDates

  1. #1
    Join Date
    Dec 1969

    Default DatesDatesDatesDatesDatesDatesDatesDatesDatesDates

    Ok here is my problem :)<BR>I have two diiferent computers running IIS 4.0<BR>Computer A & Computer B<BR>The Computer A has its Regional Settings to Short date format like so : M/d/yyyy<BR><BR>The Computer B has its Regional Settings to Short date style like so : dd/MM/yy<BR><BR>Now I have copy/paste my asp application on both servers so that I have the exact same version.<BR><BR>I have only one SQL Server Database.<BR><BR>Now If I execute my asp application on Computer A my INSERT works great. The problem is on the Computer B. When I&#039;m about to make my INSERT (from Computer B) into the SQL Server I get this error message:<BR><BR>"Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e07&#039; <BR>[Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. <BR>/contactweb/timereport.asp, line 45<BR>"<BR><BR>The Field in my SQL Server is a datetime.<BR><BR>I did a response.write of the SQL Query on both Computers A & B and this is what I&#039;ve notice.<BR><BR>In Computer A the date was : <BR>&#039;3/23/2001 8:28:00 AM&#039;<BR><BR>In Computer B the date was :<BR>&#039;23/3/2001 8:28:05 AM&#039;<BR>The problem is here SQL Server doesnt like my Computer B :(((<BR><BR>I&#039;ve tried Date Functions such as FormatDateTime() but it doesn&#039;t seem to work.<BR><BR>My question to you is:<BR>"How can we force the date to become like in Computer A or better yet can you help me ?"<BR><BR>Sincerely<BR>Vlince

  2. #2
    Join Date
    Dec 1969

    Default CROSSPOST! <eom>


  3. #3
    Join Date
    Dec 1969

    Default RE: DatesDatesDatesDatesDatesDatesDatesDatesDatesD

    It may be any of the follwing reasons:<BR>1.chack out your DB field type it should be datetime<BR>2. use convert funtion in your sql statement:<BR><BR> insert into Table_Name (Field_Name) <BR> values (Convert(datetime,&#039;3/23/2001 8:28:05 AM&#039;)<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts