473,395 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Importing date/time values

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
1 2027
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: androtech | last post by:
Hello, I'm looking for a function that returns a date range for a specified week number of the year. I'm not able to find functions like this anywhere. Any pointers/help would be much...
2
by: TheElectron707 | last post by:
Hi! I have a scenario in which i am importing a VERY LARGE database over the network. (Linking is not my solution). Now it takes many hours to import the complete database. I want that once the...
9
by: Edward S | last post by:
I budget for a Project in an Excel sheet as illustrated below. The months below are usually a 2 year period i.e. 24 months, though it could be over 24 months depending upon a Project. I then...
2
by: nutthatch | last post by:
I want to be able to import an Excel spreadsheet into Access 2K using the macro command Transferspreadsheet. However, the file I am importing (over which I have no control) contains some records...
7
by: Timothy Shih | last post by:
Hi, I am trying to figure out how to use unmanaged code using P/Invoke. I wrote a simple function which takes in 2 buffers (one a byte buffer, one a char buffer) and copies the contents of the byte...
2
by: jereviscious | last post by:
Hi all - Last resort time. I'm importing data from a spreadsheet that I receive from one of my vendor using interop.excel. The date field in excel is entered as 4/7/2006, but when I retrieve...
2
by: ScardyBob | last post by:
Hello, I am having trouble importing data from an Excel Worksheet. When I try to import the data, everything works except certain columns that contain dates, where it replaces the date with a...
6
by: venmore | last post by:
Hi Can someone please point in the right direction. I have an XML file that gets updated every 4 hours on a web server. I can check the XML modification time in ASP and compare to the databse....
1
by: jith87 | last post by:
hi guys, i need to automate the process of importing txt files in a folder into the same table in access.i have created a macro todo the job.the following are the probelms that i face: 1....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.