A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Importing Date from .CSV



 
 
Thread Tools Display Modes
  #1  
Old August 6th, 2004, 09:40 PM
external usenet poster
 
Posts: n/a
Default Importing Date from .CSV

G'day,
I'm attempting to import a .CSV file into a table. The
file is properly comma separated, but also has "quotes"
around each entry. Importing numbers and text works fine,
but the date entries yeild a "Type Conversion Failure".

sample .CSV data:
"8/1/2004 10:00 AM","david","4"

The "david" comes in fine as text david (without quotes),
and the 4 comes in as a usable integer, however, the date
leads to a failure unless I call the field type Text
instead of Date.

Comments, Suggestions, Work arounds?
(This is annoying because in a sort ascending, the text
date/times will come as 1:00, 10:00, 11:00, 12:00, 2:00,
3:00, 4:00..., since text "10" comes before text "2", even
though time "2" comes before time "10")
  #2  
Old August 6th, 2004, 11:25 PM
Ken Snell
external usenet poster
 
Posts: n/a
Default Importing Date from .CSV

Import the file's data into a temporary table, and import all as text.

Then run append query to copy the data *in the correct format* to your
permanent table. You can use the append query to change the text to date, or
text to number, etc.

--

Ken Snell
MS ACCESS MVP

wrote in message
...
G'day,
I'm attempting to import a .CSV file into a table. The
file is properly comma separated, but also has "quotes"
around each entry. Importing numbers and text works fine,
but the date entries yeild a "Type Conversion Failure".

sample .CSV data:
"8/1/2004 10:00 AM","david","4"

The "david" comes in fine as text david (without quotes),
and the 4 comes in as a usable integer, however, the date
leads to a failure unless I call the field type Text
instead of Date.

Comments, Suggestions, Work arounds?
(This is annoying because in a sort ascending, the text
date/times will come as 1:00, 10:00, 11:00, 12:00, 2:00,
3:00, 4:00..., since text "10" comes before text "2", even
though time "2" comes before time "10")



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Query Criteria where a single date comes from a form Gary O Running & Setting Up Queries 3 July 23rd, 2004 05:24 PM
Stop Word from automatically updating date field when document is opened Eternal General Discussion 4 June 18th, 2004 01:00 PM
Date Function with literal date does not resolve True Cam Worksheet Functions 6 April 30th, 2004 04:02 PM
Does date fall between two ranges? MR Worksheet Functions 4 January 14th, 2004 04:08 PM


All times are GMT +1. The time now is 02:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.