Microsoft Knowledge Base Email Alertz

KBAlertz.com: (159323) - When you import a delimited text file containing a field with values in a Medium Date format (DDMMMYY), the data for that field is not imported and an import errors table is created.

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **


Bug Tracking Software
For bug tracking software or defect tracking software or issue tracking software, visit Axosoft.


Community Site



We Send hundreds of thousands of emails using ASP.NET Email



Expert Web Design & Graphic Design
Design44.com

ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks




Article ID: 159323 - Last Review: January 19, 2007 - Revision: 3.1

ACC: Importing Text File with Dates in DDMMMYY Format (95/97)

This article was previously published under Q159323
Moderate: Requires basic macro, coding, and interoperability skills.

On This Page

SYMPTOMS

When you import a delimited text file containing a field with values in a Medium Date format (DDMMMYY), the data for that field is not imported and an import errors table is created.

CAUSE

Microsoft Access does not recognize the Medium Date format when importing dates in a delimited text file.

RESOLUTION

To import Medium Dates in a delimited text file into a new table, follow these steps:
  1. On the File menu, point to Get External Data, and then click Import.
  2. In the Import dialog box, select Text Files in the Files of type box.
  3. Find the text file you want to import, select it, and then click Import to start the Import Text Wizard (or Text Import Wizard in version 7.0).
  4. In the "Choose the format that best describes your data" dialog box, click Delimited, and then click Next.
  5. In the "What delimiter separates your fields?" dialog box, select a Delimiter and Text Qualifier depending on the format of the text file you are importing. If the first line in the text file contains field names, check the First Row Contains Field Names box. Click Next.
  6. In the "Where would you like to store your data? dialog box, click In a New Table, and then click Next.
  7. In the "You can specify information about each of the fields you are importing" dialog box, click the column heading of the column that contains the dates to select that column. In the Data Type box, select Text. Click Next.
  8. In the primary key dialog box, click an appropriate option: "Let Access add Primary Key," "Choose my own Primary Key," or "No Primary Key." Click Finish. The Wizard creates your table with a text field containing the dates in medium date format.
  9. Open the new table in Design view and change the following properties of the medium date field:
          Data Type: Date/Time
          Format: Medium Date
    						

    When you save the table and close it, the text values are converted to dates.
You can use the preceding steps to import a delimited text file and append it to an existing table. In step 6, click the option In an Existing Table instead of In a New Table, and make sure the existing table's date field is a Text data type. After you import the data, change the field's data type to Date/Time and set its Format property to Medium Date.

MORE INFORMATION

Steps to Reproduce Behavior


  1. Open any text editor, such as Notepad.
  2. Type the following four lines of delimited text:

          DDMMMYY,MMDDYY
          01-Dec-95,12/1/95
          31-Jan-96,1/31/96
          15-Mar-94,3/15/94
    						
  3. Save the file as TestDate.txt.
  4. Start Microsoft Access and open any database.
  5. On the File menu, point to Get External Data, and then click Import.
  6. In the Import dialog box, select Text Files in the Files of type box.
  7. Locate TestDate.txt, and then click Import to start the Import Text Wizard (or Text Import Wizard in version 7.0).
  8. In the "Choose the format that best describes your data" dialog box, click Delimited, and then click Finish. Note that you receive a message that some of the data (the dates in medium date format) were not imported successfully.

REFERENCES

For more information about this issue in Microsoft Access 2.0, please see the following article here in the Microsoft Knowledge Base:

131933  (http://kbalertz.com/Feedback.aspx?kbNumber=131933/EN-US/ ) ACC2: Importing a Text File with Dates in DDMMYY Format

For more information about changing a field's data type, search the Help Index for "data types, converting," or ask the Microsoft Access 97 Office Assistant.

For more information about formatting dates, search the Help Index for "dates, formats," or ask the Microsoft Access 97 Office Assistant.

APPLIES TO
  • Microsoft Access 95 Standard Edition
  • Microsoft Access 97 Standard Edition
Keywords: 
kbinterop kbprb KB159323
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Be the first to leave feedback, to help others about this knowledge base article.

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please