By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,482 Members | 2,438 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,482 IT Pros & Developers. It's quick & easy.

Importing date/time values

P: n/a
I am running an import of some date/time values that have come from a
Cognos query. These values are in a CSV file and I want to import
them into access. The CSV file would show the value thus:
01/12/2007 3:15PM

However when I import into Access, Access creates import errors ad
won't import the values. The import spec shows them as date/time.

Would it be possible to import the values into a text field and
convert them to a date/time value?

Any help would be appreciated

Regards
Trevor
Feb 6 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi Trevor,

I have had similar import errors/problems. My fix was to "prep" the
Excel sheet being imported. That means that I had to manually convert
each column in the Excel worksheet from General to the respective
datatype, text values like Name are text, numeric values are numeric,
date values are dateTime - highlight either the entire column(s) or only
highlight the column to the end of the text and right-click and format
to DateTime.

In worse case scenarios - if prep above didn't get it - I had to
programatically rewrite the data in Excel in each column because the csv
file either contained ' (single quote or apostrophe before each cell
value) or the data contained some null pointer value at the end of the
value.. So I had to use an Excel range object and loop through the
range and parse out the ' symbols or just copy each value and cast it as
its corresponding data type - that is worst case scenario.

Just by modifying the data types of each column should get it.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Feb 6 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.