Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Posts
    11

    Unanswered: BCP/Bulk Insert Datetime Problem,

    Hi,

    I am having problems getting BCP/Bulk Insert to insert dates properly.

    The dates are being presented to us as,

    dd/MM/yyyy hh:mm:ss

    however, when importing into SQL Server as a datetime field via bcp/bulk insert, they are being inserted as

    MM/dd/yyyy hh:mm:ss

    In Australia, Windows region date setting set correctly and using Latin1_General_CI_AS collation.

    Using the following format file (just the relevant sample from the file),

    8.0
    9
    1 SQLCHAR 0 17 "," 1 startDateTime Latin1_General_CI_AS

    I tried using

    1 SQLDATETIME 0 17 "," 1 startDateTime ""

    however this did not work.

    Please let me know if any additional info needed.

    Thanks!

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Dates are stored internally as numbers...the rest is just a presentation issue...look up convert in BOL
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

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