updating date

Results 1 to 4 of 4

Thread: updating date

  1. #1
    Vimmi Guest

    Default updating date

    Hello friends<BR><BR>When I update date field from an ASP page to database (SQL Server 7), It must be in reverse format as it stored in the database otherwise it gives error message as mentioned below.<BR><BR>e.g. I want to insert date in database as dd/mm/yyyy but for this I must input date from asp page in mm/dd/yyyy format. When I retrieve the same date field through asp recordset I get it as in database (dd/mm/yyyy format).<BR><BR>Now I must change this format to mm/dd/yyyy to update it from asp page. <BR>If I try as such as I receive from database (dd/mm/yyyy) I get this error<BR>message:--- <BR><BR>Microsoft OLE DB Provider for SQL Server error &#039;80040e07&#039; <BR>The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: updating date

    which database are u using

  3. #3
    Join Date
    Dec 1969

    Default Follow the link to eternity....


  4. #4
    vimmi Guest

    Default RE: updating date

    Hi!!<BR> i am using sql server 7. i am inserting the datefield in mm/dd/yy format, while retrieving the records , the datefield displays in dd/mm/yyyy (since the server follows the dd/mm/yyyy format)<BR><BR>Is there any problem with this query<BR><BR>sql= "select field1,field2 from tablename where Datefield=&#039;" <BR>sql = sql & datevar & "&#039;"<BR>RecordsetName.Open sql,Conn<BR><BR>when i display the datevar(retrieved from the database)it displays in dd/mm/yyyy, & i need to give mm/dd/yyyy to go ahead .<BR>what a confusing & weird problem !!

Posting Permissions

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