![]() |
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 |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 02:29 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com