Datetime format

Discussion in 'Databases' started by balu_dotnet, Jan 28, 2009.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi i am importing data from .txt to sql2005





    in .txt file, i have a date column with value 7/1/2008, after imported when i open up the sql2005 table, it is inserting as 7/1/2008 12:00:00 AM.


    my Qn is how i can insert exactly as 7/1/2008 (i don't need time part) in sql2005?


    i have tried with table design as smalldtetime, but still it is inserting with date and time
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    Is the data type of the column, datetime?

    If so, it always store the time as well. You can parse out the time when you query the table.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page