Solved

Access Import .csv file Time Value error

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

810 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