Solved

bcp and datetime columns

Posted on 1998-04-11
1
310 Views
Last Modified: 2008-03-06
How do I go about importing a date field in an ASCII text file into a SQL Server table smalldatetime column?
0
Comment
Question by:rhastings
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
spiridonov earned 100 total points
ID: 1091219
Use fmt file with all columns specified as SQLCHAR. When importing dates make shure the date format settings in your PC regional settings, ASCII file and SQL server  are the same. (E.g mm/dd/yy in all settngs.)
0

Featured Post

Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Rebooting Witness SQL Server 2 25
Find unused columns in a table 12 70
T-SQL to copy a database 37 66
SQL 2012 Instance Problem 3 55
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

756 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