inserting date in datetime column

Posted on 2005-04-26
Last Modified: 2010-03-19

I am inserting date in datetime column and getting error message.
message is - Syntax error converting datetime from character string.

insert into table1
Values (0,0,'0','0','0','0','0','0','0','0','5/1/2004','0','0')

Any help!
Question by:sripri96
    1 Comment
    LVL 28

    Accepted Solution

    Make sure that the columns in Table1 matches the list in your VALUES clause.  To be safe, it's better to specify the column names in your INSERT clause to make sure that the VALUES match.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    I recently came across an interesting Question In EE ( and was puzzled about how to achieve that using SSIS out of the box tasks, which was i…
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
    Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now