Results 1 to 2 of 2

Thread: smalldatetime

  1. #1
    Join Date
    Feb 2004
    Location
    Bangalore, India
    Posts
    250

    Question Unanswered: smalldatetime

    im getting this error while inserting into table (description of table given below)

    mytable
    mycode smallint identity,
    mydataitem varchar(100),
    mydatefrom smalldatetime,
    mydateto smalldatetime,
    myopcode smallint,
    lastupdate smalldatetime

    my sql statement was

    INSERT INTO mytable
    (mydataitem,mydatefrom,mydateto,myopcode,lastupdat e)
    VALUES
    ('SAMPLEDATA','01/01/2003','18/05/2003',1,'05/Mar/2004')

    THE ERROR RETURNED IN MY CLIENT APP IS
    [Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value.

    AND THAT IN QA IS

    Server: Msg 296, Level 16, State 3, Line 1
    The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value.
    The statement has been terminated.

    can ne 1 point out the mistake in my sql statement ?
    Cheers....

    baburajv

  2. #2
    Join Date
    Jan 2003
    Location
    Paris, France
    Posts
    320
    Date in MySql is used as YYYY-mm-dd

    You use dd/mm/YYYY but your application seem to use mm/dd/YYYY
    Olivier Miossec
    --
    http://www.lasso-developpeur.net/
    --

Posting Permissions

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