Solved

Access Import .csv file Time Value error

Posted on 2013-05-22
2
604 Views
Last Modified: 2013-05-23
I am using Access2003 and trying to import the following two .csv files.  I am consistently getting the error about not being able to convert the fields in:

punches.csv
Punch Time

punchestransferred.csv
Actual Start
Actual End
AdjustedStart
AdjustedEnd

I have even tried linking to the .csv file and even get errors doing that.  These are being formatted as Date/Time upon linking or import.

I DO NOT want to store these as text values in the database.  How can I get these to convert?
punches.csv
punchestransferred.csv
0
Comment
Question by:ndornack
[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
2 Comments
 
LVL 45

Assisted Solution

by:aikimark
aikimark earned 250 total points
ID: 39189815
The problem with the data in the fields is that it is only the time component of a date/time value.  The Access import code can not understand such (dateless) values as date/time values.

You can write code to do the import without the use of a temporary table.  However, I do not think you will be able to do a direct import of your CSV data using the Access import functions.
0
 
LVL 50

Accepted Solution

by:
Gustav Brock earned 250 total points
ID: 39189924
Don't import the files but link them with the time fields as text.

Then create a query to read the data using TimeValue to convert the time fields:

SELECT
  Punches.System,
  Punches.EmpNum,
  Punches.PunchDate,
  TimeValue([PunchTime]) AS RealPunchTime
FROM
  Punches;

/gustav
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

740 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