views:

101

answers:

0

Hi,

I've a sample table, and it has cols of a few types including datetime. I'm trying to test bulk insert into it using the bcp_* api. I encounter a problem when trying to insert datetime values into the DB (error msgs include 'invalid date time format' when I try to insert as text or 'numeric value out of range' when trying to use the DBDATETIME struct) I can get the input in text e.g. "Tue Jul 28 08:01:41 2009" OR as a int64 (time_t) value

please let me know the correct way to insert a date (in either/both of these date formats) into the database. many thanks!