Solved

Access Import .csv file Time Value error

Posted on 2013-05-22
2
600 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
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 49

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

863 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now