Solved

Access Import .csv file Time Value error

Posted on 2013-05-22
2
598 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
Comment Utility
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
Comment Utility
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

743 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

12 Experts available now in Live!

Get 1:1 Help Now