Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: CSV


Message #1 by "Tim Maher" <tim.maher@s...> on Tue, 21 Jan 2003 16:21:26 +0000
Hi,

I need to open a CSV file from access, check all the cells for date
value (dd/mm/yyyy hh:mm:ss) change these dates to dd/mm/yyyy format by
using VB.

Any ideas

Thanks

Tim



Message #2 by "John Ruff" <papparuff@a...> on Tue, 21 Jan 2003 08:58:12 -0800
Tim,

When I have data to import and I need to do any formatting or validating 
of
data before I permanently place it in a database, I create a temp table 
and
import the data into the temp table.  I then do whatever needs to be 
done to
the data to make it compatible with the way I want to store it.

In your case, I would;

1. Create a temp table to hold the data.

2. Create an Append query from the temp table so that the data can be 
added
to the appropriate table/tables.  In this append query you can have a 
user
defined field to format the date (MyDate: Format(CSVDate,"mm/dd/yyyy").

3. You may need to also create an Update query if the data in the temp 
table
updates any records already in the database.



John V. Ruff - The Eternal Optimist :-)
Always Looking For Contract Opportunities

www.noclassroom.com
Live software training
Right over the Internet

Home:  xxx.xxx.xxxx
Cell: 253.307/2947
9306 Farwest Dr SW
Lakewood, WA 98498

"Commit to the Lord whatever you do,
	and your plans will succeed." Proverbs 16:3



-----Original Message-----
From: Tim Maher [mailto:tim.maher@s...]
Sent: Tuesday, January 21, 2003 8:21 AM
To: Access
Subject: [access] CSV


Hi,

I need to open a CSV file from access, check all the cells for date 
value
(dd/mm/yyyy hh:mm:ss) change these dates to dd/mm/yyyy format by using 
VB.

Any ideas

Thanks

Tim







  Return to Index