Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Importing .csv with #2000-04-06 10:15:00# date format field

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Importing .csv with #2000-04-06 10:15:00# date format field

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.

"FUBARinSFO" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Importing .csv with #2000-04-06 10:15:00# date format field

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 #"???

FUBARinSFO wrote:

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


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Importing .csv with #2000-04-06 10:15:00# date format field

ps. That sample value came out as Apr 6, 2000 10:15:00.



Dave Peterson wrote:

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 #"???

FUBARinSFO wrote:

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


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Importing .csv with #2000-04-06 10:15:00# date format field

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I format date field in footer? Terry Sharman New Users to Excel 5 April 12th 06 08:08 PM
How do I change the date format when importing a txt file? vpuckett Excel Worksheet Functions 2 November 28th 05 10:53 PM
How do I format currency field in Excel 2000 w/o 2 extra zeroes? slmm Excel Discussion (Misc queries) 2 July 12th 05 03:06 PM
Excel 2000 date format cannot be set to Australian date format Brian Jones Excel Discussion (Misc queries) 1 March 30th 05 06:03 AM
Importing from SQL changes date format David Vardy Excel Programming 1 July 10th 03 03:03 PM


All times are GMT +1. The time now is 01:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"