Importing .csv with #2000-04-06 10:15:00# date format field

F

FUBARinSFO

Hi:

I've created a text file from an Excel sheet that ouputs range cell
data to a .csv. One of the fields is a time-datestamp. The file then
has a field in the format #2000-04-06 10:15:00#. (Used simple Write #n
statement to generate output lines)

When I either read the .csv directly with Excel, or open/import and
use Excel to id the field, it doesn't convert to date, even tho I
specify YMD on input -- it still has the format in the cell
#2000-04-06 10:15:00# .

I know I've seen somewhere how to fix this, I just can't remember
where, and can't find it here. I think this is the Microsoft Access
database date format for import.

Thanks in advance for any clues.

-- Roy Zider
 
J

Joel

The simpliest way to fix the problem is open the file with Notepad. Use menu
Edit - replace to remove the #. Put # in the From: box and put nothing in
the To: box. then save the file. It should read properly into excel after
the modification.
 
D

Dave Peterson

I could import the file, then fix the problem in excel:
Select the range with the dates/times
Edit|Replace
what: #
with: (leave blank)
replace all

and the data was changed to a real date/time.

Or maybe you could not use "write #" in access. Maybe "print #"???
 
F

FUBARinSFO

Dave and Joel:

Yes, the simple search/replace of '#' with '' fixes things up after
import. I just thought there was an embedded way or setting that I had
overlooked that would have enabled recognition of the #..# form of the
date as a date. 'Write #n' does this, 'Print #n' does not (but
'Print' has the disadvantage of expanding tabs to spaces.)

I'm sure this output format is an artifact of an earlier database
convention of Microsoft's, I just can't recall which it is at the
moment. But evidently it's one that Excel, 2003 version, no longer
recognizes.

Thanks for your help.

-- Roy Zider
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top