View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
zvkmpw zvkmpw is offline
external usenet poster
 
Posts: 153
Default SAVE AS CSV, KEEP DATE FORMAT

I am saving a spreadsheet where the date format was:
mm/dd/yyyy
I needed to be YYYY-MM-DD
I did that using format/custom YYYY-MM-DD.
The problem is when I save as CSV ,close, open again, the format shows:
mm/dd/yyyy


CSV files contain values, but have no way to save formats.

If possible for your application, I'd suggest saving as an Excel file
-- even an older version.

If you really need to use a CSV file, you cold change the dates to
text values using something like
=TEXT(A1,"YYYY-MM-DD")
using the resulting text values to replace the original ones. But any
date calculations you might have would be messed up afterward. The
date-to-text can be reversed using DATEVALUE() in those calculations.