Group:  Microsoft Excel ยป microsoft.public.excel.misc
Thread: Losing date format when saving .csv files

Losing date format when saving .csv files
Harley 12/31/2008 4:47:01 PM
I am exporting accounting data out of legacy database into .csv file format.
The text data is not delimited, so I use Text to Columns and set the date
fields to Text (from General). The date formats retain formatting (in my
case, mm/dd/yyyy). I save the file as a .csv. When I reopen the file, I
lose the date formatting. The date fields revert to m/d/yyyy.

I have to use .csv file in order to upload to a 3rd party.

What can I do to retain the mm/dd/yyyy format when saving as a .csv file?
Re: Losing date format when saving .csv files
Bob I <birelan[ at ]yahoo.com> 12/31/2008 5:15:05 PM
CSV files have no formatting. They are simply plain text files with a
..CSV extension, and provide no additional information about the
data/text. If you open the file with Notepad you will see that it isn't
the file loosing/changing the formatting, but the application.

Harley wrote:
[Quoted Text]
> I am exporting accounting data out of legacy database into .csv file format.
> The text data is not delimited, so I use Text to Columns and set the date
> fields to Text (from General). The date formats retain formatting (in my
> case, mm/dd/yyyy). I save the file as a .csv. When I reopen the file, I
> lose the date formatting. The date fields revert to m/d/yyyy.
>
> I have to use .csv file in order to upload to a 3rd party.
>
> What can I do to retain the mm/dd/yyyy format when saving as a .csv file?

Re: Losing date format when saving .csv files
Harley 12/31/2008 5:31:00 PM
Thanks for the quick response. After looking into this, I see that the date
fields are not changing formats, but they are dropping their leading 0's.
Can I prevent that from happening?

"Bob I" wrote:

[Quoted Text]
> CSV files have no formatting. They are simply plain text files with a
> ..CSV extension, and provide no additional information about the
> data/text. If you open the file with Notepad you will see that it isn't
> the file loosing/changing the formatting, but the application.
>
> Harley wrote:
> > I am exporting accounting data out of legacy database into .csv file format.
> > The text data is not delimited, so I use Text to Columns and set the date
> > fields to Text (from General). The date formats retain formatting (in my
> > case, mm/dd/yyyy). I save the file as a .csv. When I reopen the file, I
> > lose the date formatting. The date fields revert to m/d/yyyy.
> >
> > I have to use .csv file in order to upload to a 3rd party.
> >
> > What can I do to retain the mm/dd/yyyy format when saving as a .csv file?
>
>

Home | Search | Terms | Imprint
Newsgroups Reader