PRB: Character Mode BCP Drops Seconds and MillisecondsLast reviewed: April 28, 1997Article ID: Q100077 |
The information in this article applies to:
- Microsoft SQL Server Programmer's Toolkit, version 4.2
SYMPTOMSVersion 4.2 of the bulk copy program (BCP) drops both seconds and milliseconds when bulk copying DATETIME or SMALLDATETIME data out of SQL Server in character mode.
CAUSEWhen DATETIME or SMALLDATETIME information is extracted from SQL Server, the date is converted in the default date format:
MMM DD YYY HH:MM[AM/PM]BCP uses the default date format. When BCP is executed in character mode, both DATETIME and SMALLDATETIME data are converted to the default date format. Thus, seconds and milliseconds are not displayed.
WORKAROUNDIf it is critical to BCP the date datatype information out with both the seconds and milliseconds, one of the following methods can be used:
|
Additional query words: data type dblib
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |